]> source.dussan.org Git - jquery-ui.git/commitdiff
Calendar: Use day of the month instead day of the week for range
authorFelix Nagel <info@felixnagel.com>
Wed, 26 Aug 2015 09:49:04 +0000 (11:49 +0200)
committerFelix Nagel <info@felixnagel.com>
Thu, 10 Sep 2015 21:21:24 +0000 (23:21 +0200)
There is no sense in use the day of the week as a base for min/max range.

demos/calendar/min-max.html

index 36535b8752532e645efc520e519ddd8fbfd94470..d4b074a5eced14bd81e5e96e587cab2cf1dd24fd 100644 (file)
@@ -8,8 +8,8 @@
        <script src="../../external/requirejs/require.js"></script>
        <script src="../bootstrap.js">
                var now = new Date(),
-                       dateMin = new Date( now.getFullYear(), now.getMonth(), now.getDay() + 1 ),
-                       dateMax = new Date( now.getFullYear(), now.getMonth(), now.getDay() + 8 );
+                       dateMin = new Date( now.getFullYear(), now.getMonth(), now.getDate() + 1 ),
+                       dateMax = new Date( now.getFullYear(), now.getMonth(), now.getDate() + 8 );
 
                $( "#calendar" ).calendar({
                        min: dateMin,