From b95f63c2909a77038c446b4dd2ebb06b0d854a09 Mon Sep 17 00:00:00 2001 From: Jonatan Nadeau <23142259+LePtitJoNadeau@users.noreply.github.com> Date: Mon, 18 Dec 2023 17:38:02 -0500 Subject: [PATCH] Fix where minDate would be a reference of viewDate instead of declaring it's own date (#2878) Co-authored-by: nadj2316 --- src/js/tempus-dominus.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/tempus-dominus.ts b/src/js/tempus-dominus.ts index f152c5fcc..7d9f6e3b7 100644 --- a/src/js/tempus-dominus.ts +++ b/src/js/tempus-dominus.ts @@ -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; } /**