From ecdb87a55dceed94ce0460bafc80d99c96757f3a Mon Sep 17 00:00:00 2001 From: Jon Gunderson Date: Fri, 19 Jul 2019 13:29:51 -0500 Subject: [PATCH] Date Picker Dialog: fixes bug when clicking on a disabled day (pull #1095) In the calendar grid in the date picker dialog, days that are in a previous or next month can appear in the grid. These are disabled. Clicking them generated a JS error. This fix causes the month displayed in the grid to change to the month that includes the day clicked. --- examples/dialog-modal/js/datepicker-day.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/dialog-modal/js/datepicker-day.js b/examples/dialog-modal/js/datepicker-day.js index b200c5eee..8783c808d 100644 --- a/examples/dialog-modal/js/datepicker-day.js +++ b/examples/dialog-modal/js/datepicker-day.js @@ -161,7 +161,7 @@ DatePickerDay.prototype.handleKeyDown = function (event) { DatePickerDay.prototype.handleMouseDown = function (event) { if (this.isDisabled()) { - this.datepicker.moveFocusToDay(this.date); + this.datepicker.moveFocusToDay(this.day); } else { this.datepicker.setTextboxDate(this.day);