Skip to content
This repository has been archived by the owner on Nov 30, 2018. It is now read-only.

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
Fixed error on min and max date restriction if using "today".
  • Loading branch information
dmuy committed Sep 5, 2017
1 parent f44e779 commit 7b6eba4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dcalendar.picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ if (typeof jQuery === 'undefined') { throw new Error('DCalendar.Picker: This plu
},
/* Determines if date is disabled */
disabledDate: function (date) {
var that = this, rangeFrom = null, rangeTo = null, rangeMin = null, rangeMax = null, min = null, max = null;
var that = this, rangeFrom = null, rangeTo = null, rangeMin = null, rangeMax = null, min = null, max = null,
now = new Date(), today = new Date(now.getFullYear(), now.getMonth(), now.getDate());

if (that.minDate) min = that.minDate === "today" ? today : new Date(that.minDate);
if (that.maxDate) max = that.maxDate === "today" ? today : new Date(that.maxDate);
Expand Down

0 comments on commit 7b6eba4

Please sign in to comment.