From 430715b2065b5ca499917df869b4a95bf0cd3c5e Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Wed, 26 Aug 2015 18:06:18 +0200 Subject: [PATCH] Calendar: Use day of the month instead day of the week in setMonth Fixes $.ui.calendarDate tests. --- external/date.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/date.js b/external/date.js index 72986e29c..bc5445594 100644 --- a/external/date.js +++ b/external/date.js @@ -75,7 +75,7 @@ $.extend( _Date.prototype, { // the new date will me May 1. We will honor the month the user wants to set and if and overflow // occurs, set to last day of month. var date = this.dateObject, - days = date.getDay(), year = date.getFullYear(); + days = date.getDate(), year = date.getFullYear(); if ( days > this.daysInMonth( year, month ) ) { // Overflow -- 2.39.5