これが私のjQueryカレンダーコードです
$(document).ready(function(){
$( "#fromDate" ).datepicker({
dateFormat: 'mm-dd-yy',
changeMonth:true,
changeYear:true,
showOn: "button",
buttonImage: "../../images/calendar.gif",
buttonImageOnly: true,
maxDate: '0',
onSelect: function(dateText, inst)
{$("#toDate").val('');
$("#toDate").datepicker("option", "minDate", dateText);
}
});
$( "#toDate" ).datepicker({
dateFormat: 'mm-dd-yy',
changeMonth:true,
changeYear:true,
showOn: "button",
maxDate: '0',
buttonImage: "../../images/calendar.gif",
buttonImageOnly: true
});
});
</script>
許可された日数が次の日数を#toDate
超えないようにする必要があります。#fromDate + 30
どうやってやるの ?
どちらのカレンダーでも、現在の日付以外の日付を選択できないことに注意してください。