我想,當calender.html加載minRange和maxRange被自動選擇如何在默認日期範圍內給日期選擇器?
calender.html
<html>
<head>
<script src="http://code.jquery.com/jquery-1.12.0.min.js"></script>
<link href="datepicker.min.css" rel="stylesheet" type="text/css">
<script src="datepicker.min.js"></script>
<!-- Include English language -->
<script src="datepicker.en.js"></script>
<script type="text/javascript">
var date = new Date();
var currentMonthStartDay = new Date(date.getUTCFullYear(), date.getUTCMonth(), 1);
var currentMonthLastDay = new Date(date.getUTCFullYear(), date.getUTCMonth() + 1, 0);
$('#my-element').data('datepicker').minRange = currentMonthStartDay;
$('#my-element').data('datepicker').maxRange = currentMonthLastDay;
</script>
</head>
<body>
<!-- <input type='text' class="datepicker-here" data-position="right top" /> -->
<div class="datepicker-here" id='my-element' data-language='en' data-range="false"></div>
</body>
</html>
我不能設置minRange和maxRange