Skip to content

Commit 9162679

Browse files
committed
Datepicker: Account for daylight saving when calculating number of days in a month. Fixes #6978 - In Calender for march 2011 dates showing till 5th only.
Thanks jomyjohn (cherry picked from commit c44818f)
1 parent ab7a5b4 commit 9162679

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/jquery.ui.datepicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1656,7 +1656,7 @@ $.extend(Datepicker.prototype, {
16561656

16571657
/* Find the number of days in a given month. */
16581658
_getDaysInMonth: function(year, month) {
1659-
return 32 - new Date(year, month, 32).getDate();
1659+
return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();
16601660
},
16611661

16621662
/* Find the day of the week of the first of a month. */

0 commit comments

Comments
 (0)