Skip to content

Commit

Permalink
Fix where minDate would be a reference of viewDate instead of declari…
Browse files Browse the repository at this point in the history
…ng it's own date (#2878)

Co-authored-by: nadj2316 <[email protected]>
  • Loading branch information
LePtitJoNadeau and nadj2316 authored Dec 18, 2023
1 parent 41ee0a4 commit b95f63c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/tempus-dominus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,13 +418,13 @@ class TempusDominus {
newConfig.restrictions.maxDate &&
this.viewDate.isAfter(newConfig.restrictions.maxDate)
)
this.viewDate = newConfig.restrictions.maxDate;
this.viewDate = newConfig.restrictions.maxDate.clone;

if (
newConfig.restrictions.minDate &&
this.viewDate.isBefore(newConfig.restrictions.minDate)
)
this.viewDate = newConfig.restrictions.minDate;
this.viewDate = newConfig.restrictions.minDate.clone;
}

/**
Expand Down

0 comments on commit b95f63c

Please sign in to comment.