Skip to content

Commit

Permalink
Date Picker Dialog: fixes bug when clicking on a disabled day (pull #…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
jongund authored and mcking65 committed Jul 19, 2019
1 parent a2b8c17 commit ecdb87a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/dialog-modal/js/datepicker-day.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ecdb87a

Please sign in to comment.