Skip to content

Commit c44818f

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
1 parent c94ec23 commit c44818f

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)