How to reset a field when changing a date ui.datepicker.js
I'm using ui.datepicker.js
I have a form and when the date is changed I want that another field reset the status (thi开发者_如何学Cs field is a dropdown select box).
The case is the following: The user enter the latest billing date in the calendar (when he prepare a bill) and he select the status unpaid, when he will received the money he will change the status manually to paid.
But next time the user will bill he will change the latest billing date and I want to make sure that the status is switch back to unpaid.
If I understand your issue correctly, You'll need to use the onSelect
callback event and set the value of your dropdown when a date has been selected from the datepicker
Example Code:
$('#dateInput').datepicker({
onSelect: function(dateText, inst) {
$("#mydropdown").val("Please Select");
}
});
精彩评论