jQuery UI의 datepicker를 사용한다고 가정하면 날짜 범위를 찾고 있다고 생각합니다.
$(function() {
$("#from").datepicker({
//not needed
defaultDate: "+1w",
//to show the month dropdown
changeMonth: true,
//the number of months to be shown when input is focussed
numberOfMonths: 1,
//**Important!**
onClose: function(selectedDate) {
//dynamically set min-date of second datepicker to selected date in the first datepicker
$("#to").datepicker("option", "minDate", selectedDate);
}
});
$("#to").datepicker({
defaultDate: "+1w",
changeMonth: true,
numberOfMonths: 1,
onClose: function(selectedDate) {
//dynamically set max-date property of #from text box
$("#from").datepicker("option", "maxDate", selectedDate);
}
});
});
문서는 JS에서, 그리고
<label for="from">From</label>
<input type="text" id="from" name="from" />
<label for="to">to</label>
<input type="text" id="to" name="to" />
: :이 같은 마크 업이있을 것이다 http://jqueryui.com/datepicker/#date-range
[mindate 설정 JQuery와 날짜 선택기]의
가능한 중복 (HTTP : // 유래 .com/questions/16368534/jquery-datepicker-set-mindate) – adeneo