When the calendar control provided in the WPF toolkit (and included in .Net 4) is displayed in “month view”, it displays days from the previous and the next month, filling up the entire calendar. When you click on a day of the previous or next month, it will scroll a month backwards or forwards automatically. This behavior is throwing my users off.
Is there any way to prevent this automatic scrolling from happening?
Thanks!
If you set the DisplayDateStart property to the first day of the month and the DisplayDateEnd property to the last day of the month, those days from other months are not show, and hence cannot be clicked on.
If you can do it in xaml, it would look like this:
But that would only work if you knew that dates at design time. So you would probably want to set the dates in the code.
Of coarse you would need to provide the first and last day of the particular month.