Blackoutdating com dating out of your race
Here's an example where we set the selected date to tomorrow from Code-behind and then use a data binding to read out the selected date to a Text Box control: In Code-behind, we simply set the Selected Date property to the current date plus one day, meaning tomorrow.
This property can be accessed from Code-behind or used with a binding, like we do here: With a simple binding like that, we're now able to display a list of the currently selected dates.
Simply set it to a date within the month you wish to start with and it will be reflected in the control: In the Single Range Selection Mode, you can select an entire range of dates, either by holding down the left mouse button and dragging from one date to another or by holding down the Ctrl or Shift keys while clicking several dates, much like multi selection works in all parts of Windows.
On the screenshot, I've selected an entire week, from Sunday to Monday, but you can just as easily select dates in the middle of the week and ranges which expands a single week.
Single Range mode only allows a single range of dates to be selected though, much like the name suggests.
This means that you can't select two dates which are not next to each other, and you can't select more than one range.
You will probably notice from our first example that the Calendar doesn't take up all the available space.