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

Fix bug with DatePicker where selecting a month would lock up. #387

Merged
merged 1 commit into from
Feb 26, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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