Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v6.7.13 maxDate option crashes the plugin #2850

Closed
3 tasks done
johncrislasta opened this issue Aug 25, 2023 · 7 comments
Closed
3 tasks done

v6.7.13 maxDate option crashes the plugin #2850

johncrislasta opened this issue Aug 25, 2023 · 7 comments

Comments

@johncrislasta
Copy link

Prerequisites

Describe the issue

I have installed v6.7.13 and I'm getting an error when I set the maxDate in the restrictions option.

The error is:

Uncaught TypeError: Cannot read properties of undefined (reading 'localization')
    at set viewDate [as viewDate]

I tested my setup on the stackblitz provided, but it worked:
I discovered that using a lower version, 6.7.7 worked.
I'll just use that version until the issue is fixed on the latest release.

Thanks!

StackBlitz fork

https://stackblitz.com/edit/tempus-dominus-v6-simple-setup-cwswbe?file=index.js

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you seeing the problem on?

Chrome

What version of are you using? You can find this information from the sample StackBlitz.

6.7.13

What your browser's locale? You can find this information from the sample StackBlitz.

en-US

@johncrislasta johncrislasta added State: Triage Tickets that need to be triaged. Type: Bug labels Aug 25, 2023
@stackblitz
Copy link

stackblitz bot commented Aug 25, 2023

@github-project-automation github-project-automation bot moved this to 🆕 New in Tempus Dominus Aug 25, 2023
@Gandhi11
Copy link

Same things is happening with the minDate restriction.

@Gandhi11
Copy link

After digging a little bit it look like it is related to the changes done for #2828

@apircher
Copy link

I have the same problem. The error occurs in the viewDate setter when the viewDate is set from _initializeOptions - before this.optionsStore.options is assigned.

The setter tries to call this.optionsStore.viewDate.setLocalization(this.optionsStore.options.localization) but this.optionsStore.options is undefined.

It happens if there is a maxDate and the viewDate (i.e. new Date()) is after the maxDate or if there is a minDate and the viewDate is before the minDate.

@solomax
Copy link

solomax commented Aug 29, 2023

Also reproducible for me ...
Everything works as expected with 6.7.11

@youlead-bow
Copy link

We also have the bug

@Eonasdan Eonasdan moved this from 🆕 New to 🏗 In progress in Tempus Dominus Sep 28, 2023
Eonasdan added a commit that referenced this issue Sep 28, 2023
Eonasdan added a commit that referenced this issue Sep 28, 2023
@Eonasdan Eonasdan added Area: TypeScript and removed State: Triage Tickets that need to be triaged. labels Sep 28, 2023
Eonasdan added a commit that referenced this issue Oct 6, 2023
Fixed #2850
Fixed #2855
@Eonasdan
Copy link
Owner

Eonasdan commented Oct 6, 2023

New release should fix this.

@Eonasdan Eonasdan moved this from 🏗 In progress to 🚀 Released in Tempus Dominus Oct 6, 2023
@Eonasdan Eonasdan moved this from 🚀 Released to ✅ Done in Tempus Dominus Oct 16, 2023
Eonasdan added a commit that referenced this issue Nov 6, 2023
* 6.7.11

* 6.7.11

* fixes #2828

* fixes #2828

* fixes #2811
fixes #2846
fixes #2845

* stupid git

* #2850 fixes max date

* #2850 fixes max date

* #2855 fixes format strings

* Reverted #2811
Fixed #2850
Fixed #2855

* merge latest v6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

6 participants