Is there a way (using a Calendar control in Visual Studio WPF) I can obtain a value without actually selecting a day within the control.
For example, I have a client that wants the calendar's DisplayMode = Year. And now let's say they select the month of March within the control. That will change the DisplayMode to Month and no value is EVER set until they select a day in that month within the control.
Is there a way I can obtain the year and month and set it to a value without them actually selecting a day? Because in this case the day does not matter.
I've found some workarounds that don't involve using the Calendar control or DatePicker but I would like to continue using these controls for UI purposes.
You will need to create a DisplayModeChanged event and change the mode accordingly:
This will allow you to change the month and/or year and not bother with the day. You will want to set the initial display mode to month.