We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

way to disable date change when user changes the month

Is there a way to disable changing the selected date when we change the month shown on the calendar?  
We are tying an event to when the selected date changed that we only want fired when the user actually clicks on a date but not when they are switching months.

4 Replies

HH Henry Harris replied to Henry Harris July 1, 2015 08:41 PM UTC

Is there a way to disable changing the selected date when we change the month shown on the calendar?  
We are tying an event to when the selected date changed that we only want fired when the user actually clicks on a date but not when they are switching months.

The issue is that the users are focused on the calendar and hit the scroll wheel which changes the selected date without the user knowing it since they didn't click on the calendar again.  So we need a way to either disable the date from changing when the month of the calendar changes or disable the scroll wheel causing the months to change.


SM Sugapriya Mariappan Syncfusion Team July 2, 2015 04:42 PM UTC

Hi Henry,
Query #1: Is there a way to disable changing the selected date when we change the month shown on the calendar?  
In our implementation, when Month is changed, then Date will also change, So It is not possible to disable the option for changing the selected date when we change the month
Query #2: Disable the scroll wheel causing the months to change
We have prepared a sample which tries to meet your requirement. In the sample we have disabled the NavigationButton by using FindName method
Kindly download the sample from the below link:
Sample link:CalendarWPFSample

Please let us know if you need any other assistance

Regards,
M.Sugapriya



HH Henry Harris July 9, 2015 05:37 PM UTC

We still need to be able to change the months so this won't work.  We just want it so that the scroll wheel will not change the months.


SM Sugapriya Mariappan Syncfusion Team July 10, 2015 12:20 PM UTC

Hi Henry,

Sorry for the inconvenience caused

“Query #1: scroll wheel will not change the months.”

We have prepared a sample which tries to meet your requirement. In this sample, we have handled PreviewMouseWheel event to stop scroll wheel causing months to change

Please download the sample from the below link
Sample link:CalendarWPFSample

If your requirement is different from this sample, please provide more information about your requirement

Please let us know if you need any other assistance
Regards,
M.Sugapriya

Loader.
Live Chat Icon For mobile
Up arrow icon