DatePicker Done button onclick
Hi - I have a DatePicker that displays Month/Year drop-down, I want to get the input field updated with mm/yyyy when the user click the "Done" button from the button panel
Tried to attach a click event but didn't work:
onOpen: function(){
button = $(this).datepicker('widget').find("button:contains('Done')");
button.click(function(){
var month = $("##ui-datepicker-div .ui-datepicker-month :selected").val();
var year = $("##ui-datepicker-div .ui-datepicker-year :selected").val();
$(this).datepicker('setDate', new Date(year, month, 1));
});
},