Skip to content

Commit

Permalink
fix(date limitation): minDate/maxDate could not be reset
Browse files Browse the repository at this point in the history
adding null check to reset minDate/maxDate
  • Loading branch information
crsten committed Nov 17, 2016
1 parent 1064087 commit 011c79a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist/datepickk.js
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@
return minDate;
},
set: function(x){
minDate = new Date(x);
minDate = (x) ? new Date(x) : null ;
setDate();
}
},
Expand All @@ -1057,7 +1057,7 @@
return maxDate;
},
set: function(x){
maxDate = new Date(x);
maxDate = (x) ? new Date(x) : null ;
setDate();
}
},
Expand Down
2 changes: 1 addition & 1 deletion dist/datepickk.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/datepickk.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/js/datepickk.js
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@
return minDate;
},
set: function(x){
minDate = new Date(x);
minDate = (x) ? new Date(x) : null ;
setDate();
}
},
Expand All @@ -1057,7 +1057,7 @@
return maxDate;
},
set: function(x){
maxDate = new Date(x);
maxDate = (x) ? new Date(x) : null ;
setDate();
}
},
Expand Down

0 comments on commit 011c79a

Please sign in to comment.