Hi @Tj7933, limiting the input of a date picker to only this week is certainly possible.
(1) Set the DefaultDate property to Today()
(2) Write the following code in the OnChange property:
If(
Self.SelectedDate < DateAdd(
Today(),
1 - Weekday(
Today(),
StartOfWeek.Monday
),
Days
) || Self.SelectedDate > DateAdd(
Today(),
1 - Weekday(
Today(),
StartOfWeek.Monday
) + 6,
Days
),
Notify(
"Please select a date within this week",
NotificationType.Error,
3000
); Reset(Self);
)
When picking a date, the code above checks if it is between Monday to Sunday. Picking a date outside that week will throw an error and reset the date picker back to the default, being Today(). If you don't want to count the weekend, change the +6 to +4.
Note: if the allowed week can change, you will have to change the Today() in the DefaultDate & all Today() mentions in the OnChange code to the selected date value.
If this solves your question, would you be so kind as to accept it as a solution.
Thanks!