This is a migrated thread and some comments may be shown as answers.

DatePicker SelectedDateChanged fires twice

2 Answers 215 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
nav100
Top achievements
Rank 1
nav100 asked on 03 May 2013, 01:37 AM
I have SelectedDateChanged event in code behind and invloking radconfim to with OK and Cancel buttons. The SelectedDateChanged works fine but when I click on 'Cancel' button 'SelectedDateChanged' fires twice. When I click on 'OK' button I am saving the 'Date' in the database. Could you please let me know why this event fires twice. I am using Telerik 2010 Q3 controls.
Also I have <asp:ImageButton next to the DatePicker. When I click on this button I would like to clear the date from DatePicker. But when I click on it 'SlectedDateChanged' event fires. I am not sure why? Please let me know. Thank you for any help.

2 Answers, 1 is accepted

Sort by
0
nav100
Top achievements
Rank 1
answered on 03 May 2013, 01:33 PM
Telerik team, Could you please let me know any input?
0
Vasil
Telerik team
answered on 06 May 2013, 03:13 PM
Hello,

Could you confirm that the Page_Load fires only one when you debugging and the SlectedDateChanged twice? I have seen some projects with problem that during Ajax, two requests are made, one of them that get's canceled. In this case however all events are getting executed twice.

Do you want to clear the value of the DatePicker server or client side? If you clear it server side, it will be normal for the event to fire. If you are clearing it ClientSide, make sure that you suppress the PostBack caused by your ImageButton and that only JavaScript is executed on its click.

All the best,
Vasil
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Calendar
Asked by
nav100
Top achievements
Rank 1
Answers by
nav100
Top achievements
Rank 1
Vasil
Telerik team
Share this question
or