I have a textbox extended with the calendar extender in ASP.NET Ajax. If I get the selected date of the calendar, the variable is null, and the text of the textbox always defaults to the value I specified (Default) for when the page loads.
How can I get the selecte开发者_如何学编程d date when I change it? I need this for the button click event handler.
Thanks
The calendar extender has a selectedDate() property on the client-side API, and a dateSelectionChanged event if you need immediate notification; you can get the selected date via:
var date = $find("<%= cal1").get_selectedDate();
which should be not null; I looked in the JS and it is setting it when clicking on the day.
HTH.
精彩评论