I need to check if the selected date from a datepicker is not on a weekend. The function needs to keep checking if the new startdate is a weekend. Also it need to add days to the startdate if a weekend occurs.
Code should be something like this:
int startday = Datepicker1.SelectedDate;
if (startdate = weekendday, startdate++)
{
startdate++ //or if a sunday +2
}
else
{
return startdate
}
Thank you for your help.
1 Answer