1397选择月份时,只能选择May
$( "#<%= renderResponse.getNamespace() %>fromDate").datepicker({
dateFormat: 'yy/mm/dd',
changeMonth: true,
changeYear: true,
showButtonPanel: true,
maxDate: new Date(),
beforeShow: function (input, inst) {
var rect = input.getBoundingClientRect();
setTimeout(function () {
var offset = $(input).offset();
inst.dpDiv.css({ top: offset.top, left: offset.left });
}, 0);
},
onSelect: function(dateText, inst) {
$('#<%= renderResponse.getNamespace() %>toDate').datepicker('option', 'minDate', new JalaliDate(inst['selectedYear'], inst['selectedMonth'], inst['selectedDay']));
}
});
$( "#<%= renderResponse.getNamespace() %>toDate").datepicker({
dateFormat: 'yy/mm/dd',
changeMonth: true,
changeYear: true,
showButtonPanel: true,
maxDate: new Date(),
beforeShow: function (input, inst) {
var rect = input.getBoundingClientRect();
setTimeout(function () {
var offset = $(input).offset();
inst.dpDiv.css({ top: offset.top, left: offset.left });
}, 0);
},
onSelect: function(dateText, inst) {
$("#<%= renderResponse.getNamespace() %>fromDate").datepicker('option', 'maxDate', new JalaliDate(inst['selectedYear'], inst['selectedMonth'], inst['selectedDay']));
}
});