So firstly working out previous date is purely logic based:
You need to get today’s date using Datetime.Now
Minus a day at a a time (you can use .AddDays(-1)
check if that date is either a saturday / sunday (Using .DayOfWeek.ToString) or a date in a list or datatable of holidays (you will need to create this list with specific dates) .
(If List use List.Contains)
(If datatable Select function etc)
This will enable you to work out how many days you need to go back from today’s date to get the previous working day.
Once you have the date in your date picker, simple looks at selectors to determine how you can select the right day of the month
These two stuffs can be handled with what @TimK suggested, but this one
we must have those dates stored in a list, as it differs with the places
for saturday and sunday we can check with a if condition like this yourdatetimevariable.DayOfWeek.ToString.
with which we can check whether it is “Saturday” or “Sunday”
for dynamic selection of date in a calender, i hope this would help you buddy