@JMAFO
Ah yes, it is! I sorted a way to fix this though by using two variables.
In the OnChange of DateStart datepicker add this code:
Switch(Weekday(StartDate.SelectedDate),
7, Set(vStart, DateAdd(StartDate.SelectedDate, 2,Days)),
1, Set(vStart, DateAdd(StartDate.SelectedDate, 1,Days)),
Set(vStart, StartDate.SelectedDate)
)
This formula sets the StartDate to the next Monday if a Saturday or Sunday is picked as the StartDate.
Then, in the OnChange of the DateEnd datepicker add this code:
Switch(Weekday(EndDate.SelectedDate),
7, Set(vEnd, DateAdd(EndDate.SelectedDate, -1,Days)),
1, Set(vEnd, DateAdd(EndDate.SelectedDate, -2,Days)),
Set(vEnd, EndDate.SelectedDate)
)
This formula sets the EndDate to a Friday if a Saturday or Sunday is picked as the EndDate.
Then to finish, change all of the references to StartDate.SelectedDate to vStart and EndDate.SelectedDate to vEnd. This seems to be working at my end but maybe just run a few checks yourself.