Skip to content

Commit 011c79a

Browse files
committed
fix(date limitation): minDate/maxDate could not be reset
adding null check to reset minDate/maxDate
1 parent 1064087 commit 011c79a

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

dist/datepickk.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@
10481048
return minDate;
10491049
},
10501050
set: function(x){
1051-
minDate = new Date(x);
1051+
minDate = (x) ? new Date(x) : null ;
10521052
setDate();
10531053
}
10541054
},
@@ -1057,7 +1057,7 @@
10571057
return maxDate;
10581058
},
10591059
set: function(x){
1060-
maxDate = new Date(x);
1060+
maxDate = (x) ? new Date(x) : null ;
10611061
setDate();
10621062
}
10631063
},

dist/datepickk.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/datepickk.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/datepickk.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@
10481048
return minDate;
10491049
},
10501050
set: function(x){
1051-
minDate = new Date(x);
1051+
minDate = (x) ? new Date(x) : null ;
10521052
setDate();
10531053
}
10541054
},
@@ -1057,7 +1057,7 @@
10571057
return maxDate;
10581058
},
10591059
set: function(x){
1060-
maxDate = new Date(x);
1060+
maxDate = (x) ? new Date(x) : null ;
10611061
setDate();
10621062
}
10631063
},

0 commit comments

Comments
 (0)