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

Datepicker onKeyUp?

1 Answer 270 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 18 Sep 2008, 07:41 PM
I am using the 'OnDateSelected' to do some checks when the date is changed but I also need to check when they type into the textbox and change the date. I tried adding the onKeyUp event to my datepicker on form load but it does not fire.
The problem is that I enable/disable a button if any thing on the form has changed. If they pick a different date via the calendar the OnDateSelected fires and the button is enabled. If they then type in the textbox and change the date back to the original and click the button, the page freezes because my javascript is trying to disable the button (OnDateSelected fires when the textbox loses focus) at the same time the page is trying to do a postback The button shows in the pressed state and the page just sits there.

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 23 Sep 2008, 11:12 AM
Hello Mike,

You could try using the OnKeyPress event in order to verify whether the user presses a key to enter a value. It does not occur when the user presses navigation keys, the delete key, and so on.

Regards,
Maria Ilieva
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Calendar
Asked by
Mike
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or