Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #387 from OfficeDev/thocon/datePickerMonthFix
Browse files Browse the repository at this point in the history
Fix bug with DatePicker where selecting a month would lock up.
  • Loading branch information
Mike Wheaton committed Feb 26, 2016
2 parents 62537e7 + c096ada commit 1dc1315
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/DatePicker/Jquery.DatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,15 @@
/** Change the highlighted date. */
function changeHighlightedDate($picker, newYear, newMonth, newDay) {

/** All variables are optional. If not provided, default to the current value. */
if (newYear === null) {
newYear = $picker.get('highlight').year;
/** All letiables are optional. If not provided, default to the current value. */
if (typeof newYear === "undefined" || newYear === null) {
newYear = $picker.get("highlight").year;
}
if (newMonth === null) {
newMonth = $picker.get('highlight').month;
if (typeof newMonth === "undefined" || newMonth === null) {
newMonth = $picker.get("highlight").month;
}
if (newDay === null) {
newDay = $picker.get('highlight').date;
if (typeof newDay === "undefined" || newDay === null) {
newDay = $picker.get("highlight").date;
}

/** Update it. */
Expand Down

0 comments on commit 1dc1315

Please sign in to comment.