I have an input field with onChange event which triggers an AJAX call which saves the new value of the input field in the database. This works fine when the user manually enters the text in the text field but not when I attach jQuery datepicker to the field.
What I would like to do is make the text field readonly, attached datepicker to it and have onchange event to be fired when user selects a date in the datepicker.
So, there are two problems to solve:
- Trigger onChange event on the text field when date is selected in datepicker.
- Make sure the solution works if text field is readonly.
Thanks
You have to use Datepicker events instead of assigning events to textbox