我想将我的 daterangepicker 的 startdate 和我的 daterangepickertoday + 1 day
的 enddate 设置为today + 2 days
.
<script type="text/javascript">
$(document).ready(function () {
var date = new Date();
var currentMonth = date.getMonth();
var currentDate = date.getDate();
var currentYear = date.getFullYear();
$('input[name="daterange"]').daterangepicker({
minDate: new Date(currentYear, currentMonth, currentDate)
, dateFormat: 'yy-mm-dd'
, startDate: +1
, endDate: +2
, locale: {
format: 'DD.MM.YYYY'
}
});
});
</script>
我的结果是09.08.2017 - 09.08.2017
但我期待10.08.2017 - 11.08.2017