Skip to content

Commit

Permalink
Throw error one day interval between min and max only if there is no …
Browse files Browse the repository at this point in the history
…time picker
  • Loading branch information
Freddy03h committed Mar 10, 2015
1 parent 119c41b commit 7a2c2f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function defaults (options, cal) {
o.max = o.min;
o.min = temp;
}
if (o.date === true) {
if (o.time === false) {
if (o.max.clone().subtract(1, 'days').isBefore(o.min)) {
throw new Error('`max` must be at least one day after `min`');
}
Expand Down

0 comments on commit 7a2c2f4

Please sign in to comment.