ASP.NET - ASP.NET - AJAX - CalendarExtender - OnClientDateSelectionChanged

Asked By Timothy Vandeweerd on 19-May-15 11:53 AM
In the code behind page via the OnClientDateSelectionChanged event of the CalendarExtender I would like to catch the newly selected date.

<asp:CalendarExtender ID="CalendarExtender1" runat="server" OnClientDateSelectionChanged="" TargetControlID="txtDate" Format="dd-MMM-yyyy"></asp:CalendarExtender>


Robbe Morris replied to Timothy Vandeweerd on 19-May-15 11:55 AM
If the designer doesn't automatically add this to your code behind file.  Do this to discover the event signature.

In the Page_Load event, type in CalendarExtender1.OnClientDateSelectionChanged += and you should get Visual Studio to prompt to add the event code for you.  If it doesn't, mouse over OnClientDateSelectionChanged and see what Visual Studio shows as the event signature.

Of course, when you are done, remove that line code from the Page_Load event.
Timothy Vandeweerd replied to Robbe Morris on 20-May-15 09:14 AM
Robbie,
 
Thank you for the quick reply. Sorry for my poor description. Can we try this again?

Using the CalendarExtender control I would like to be able to catch the selected date when I populate the "OnClientDateSelectionChanged" event with a JavaScript funtion that allows me to see the selected date in the code behind page.

Please and Thanks,
Timothy