datepicker wont work after disabling month and year to false
I've been stuck on this for more than 4 hours. I want only to select
months with the arrows then when I press the show button ajax operation
will start (I'm ok with this).
Example & code here:
$(function() {
$('.dp').datepicker( {
changeMonth: false,
changeYear: false,
showButtonPanel: false,
dateFormat: 'mm-yy',
onClose: function(dateText, inst) {
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));
}
});
});
Here is my jsFiddle.
No comments:
Post a Comment