Hi @Anonymous ,
Do you want to reset the Date Pickers if entering the dates which belonged to the date range?
You could try the following formula:
Set(
_warning,
IsEmpty(
Filter(
Collection,
(StartDate>LeaveStartDatePicker.SelectedDate&&StartDate>LeaveEndDatePicker.SelectedDate)
||
(EndDate<LeaveStartDatePicker.SelectedDate&&EndDate<LeaveEndDatePicker.SelectedDate)
)
)
);
If(
_warning,
Reset(LeaveStartDatePicker);Reset(LeaveEndDatePicker)
)
Best regards,
If the LeaveStartDate and LeaveEndDate are both less than StartDate, that’s Ok and do not need reset.
Or if the LeaveStartDate and LeaveEndDate are both larger than EndDate, that’s also Ok.
So, if above conditions are not met, Collection will be empty, and _warning will be “true”. Then it is need to reset Date Pickers.
