Eonasdan / tempus-dominus

A powerful Date/time picker widget.
https://getdatepicker.com
MIT License
7.16k stars 4.41k forks source link

minDate option Error: this.optionsStore.options is undefined #2865

Closed reasecret closed 9 months ago

reasecret commented 9 months ago

Prerequisites

Describe the issue

I'm trying to use minDate restriction like this:

restrictions: {
                minDate: new Date(),
                maxDate: undefined,
                disabledDates: [],
                enabledDates: [],
                daysOfWeekDisabled: [],
                disabledTimeIntervals: [],
                disabledHours: [],
                enabledHours: []
            },

but getting this error:

Uncaught TypeError: this.optionsStore.options is undefined tempus-dominus.min.js:6:72541

Tried v6.7.7 on StackBlitz and there is no error.

StackBlitz fork

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

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

Windows

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

Firefox

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.

tr-Tr

Eonasdan commented 9 months ago

duplicate of #2850