I’ve got two html textboxes (txtFrom and txtTo) which is read-only. These two textboxes are used to show dates from datepicker.
My scenario is when txtTo textbox is filled with date i want to call a javascript which subtracts the two dates (txtTo – txtFrom) and enter the result in another textbox named txtDays.
How can i do this? I can’t call onkeypress or onkeyup event since the textbox is read-only.
you should have callback function on that datepicker, when user selects a date it could call this function
dont know if its yours or third party datepicker but he should have defined callback when user selects a date and than it writes it to the text input, you should be able to add your function at this place