Hi,
First let me say that I've seen this post at the following URL, and it won't do everything I need to do.
http://www.telerik.com/community/forums/aspnet-ajax/calendar/how-to-prevent-client-dateselected-from-being-fired.aspx
I have a RadDatePicker with a Calendar, and want to do the following:
- Allow the user to change a date by editing the textbox of the RadDatePicker (and also via the calendar popup).
- When they do change the date by editing the textbox of the RadDatePicker, I want to have a javascript function confirm that they really want to do this.
- If they choose to Cancel, I want to reset the date in the RadDatePicker textbox back to its original value.
I can do all of that via a javascript function assigned to the OnDateSelected client side event. But when I reset the date back to the original date using set_selectedDate, that of course causes the OnDateSelected event to fire again. So in my case, I get another prompt asking them to confirm their actions.
Question: How can I cancel the event before calling set_selectedDate, so the event doesn't fire again?
The workaround shown in the link above, does something in the popup opening event. But that doesn't handle the case I'm talking about, where the user physically changes the date by typing in the textbox.
Thanks,
Brent
First let me say that I've seen this post at the following URL, and it won't do everything I need to do.
http://www.telerik.com/community/forums/aspnet-ajax/calendar/how-to-prevent-client-dateselected-from-being-fired.aspx
I have a RadDatePicker with a Calendar, and want to do the following:
- Allow the user to change a date by editing the textbox of the RadDatePicker (and also via the calendar popup).
- When they do change the date by editing the textbox of the RadDatePicker, I want to have a javascript function confirm that they really want to do this.
- If they choose to Cancel, I want to reset the date in the RadDatePicker textbox back to its original value.
I can do all of that via a javascript function assigned to the OnDateSelected client side event. But when I reset the date back to the original date using set_selectedDate, that of course causes the OnDateSelected event to fire again. So in my case, I get another prompt asking them to confirm their actions.
Question: How can I cancel the event before calling set_selectedDate, so the event doesn't fire again?
The workaround shown in the link above, does something in the popup opening event. But that doesn't handle the case I'm talking about, where the user physically changes the date by typing in the textbox.
Thanks,
Brent