]> source.dussan.org Git - jquery-ui.git/commitdiff
Datepicker: Account for daylight saving when calculating number of days in a month...
authorScott González <scott.gonzalez@gmail.com>
Wed, 16 Feb 2011 18:15:14 +0000 (13:15 -0500)
committerScott González <scott.gonzalez@gmail.com>
Wed, 16 Feb 2011 18:16:00 +0000 (13:16 -0500)
Thanks jomyjohn
(cherry picked from commit c44818fccaeb4f41fdb8b8a00662169a4258b78c)

ui/jquery.ui.datepicker.js

index ff6ebad522c558329ec69670d4fe83d0caa76f6b..c23984530d29184675f08dbcc0fca01982a43b5a 100644 (file)
@@ -1656,7 +1656,7 @@ $.extend(Datepicker.prototype, {
 
        /* Find the number of days in a given month. */
        _getDaysInMonth: function(year, month) {
-               return 32 - new Date(year, month, 32).getDate();
+               return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();
        },
 
        /* Find the day of the week of the first of a month. */