开发者

AJAX Calendar Extender onchange event

开发者 https://www.devze.com 2023-04-05 04:18 出处:网络
I am using an AJAX Calendar Extender as the calendar 开发者_StackOverflow中文版component in my project. And I need to call some javascript function on change of the date..

I am using an AJAX Calendar Extender as the calendar 开发者_StackOverflow中文版component in my project. And I need to call some javascript function on change of the date.. I am using onclientdateselectionchanged event to do this and it works fine. But the problem is it works only If I select the date from the calendar using mouse. If I enter the date manually then the javascript function is not getting called..Can you please suggest how to call the function, if I enter the date manually also. Thanks in Advance..


You probably have solved this one way or another long ago, but I ran into this today while searching for (what turns out to be my answer:) onclientdateselectionchanged. Since you helped me find my answer, here is yours.

To handle the case where the user manually enters date info, just apply another handler for "onkeyup" event. Example:

  txtLastName.Attributes.Add("OnKeyUp", "OnFormFieldChanged();");


I strongly recommend you to switch to jQuery UI Datepicker, you won't regret:

http://jqueryui.com/demos/datepicker/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号