views:

214

answers:

1

Hi,

I'm using ui.datepicker.js

I have a form and when the date is changed I want that another field reset the status (this 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.

Thanks

+1  A: 

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");
             }
});
duckyflip