我有代码 JS
$(function () {
$("#from").datepicker({
defaultDate: "+1w",
changeMonth: true,
numberOfMonths: 3,
onClose: function (selectedDate) {
$("#to").datepicker("option", "minDate", selectedDate);
}
});
$("#to").datepicker({
defaultDate: "+1w",
changeMonth: true,
numberOfMonths: 3,
onClose: function (selectedDate) {
$("#from").datepicker("option", "maxDate", selectedDate);
}
});
});
代码 HTML
<input type="text" id="from" name="from" />
<label for="to">to</label>
<input type="text" id="to" name="to" />
我想在每个选择的文本中保存值,现在我选择了它禁用的日期我选择了,请帮助我