Closed martnst closed 5 months ago
I noticed that the Typescript interface Options differs from the docs.
interface Options
For example: restrictions?.minDate is defined as optional DateTime in the see https://github.com/Eonasdan/tempus-dominus/blob/5da648d6cd5a469e111ac74ba4d259b6b5b9ab04/src/js/utilities/options.ts#L53
restrictions?.minDate
DateTime
The docs however states:
Accepts: string | Date | DateTime Defaults: undefined
This results in a TS error when using the lib.
https://stackblitz.com/edit/tempus-dominus-v6-repl-vkqxv8?file=example.ts
macOS
Chrome
v6
en-*
Once the JS is built, it does accept those value types, since a string is the most likely value type coming from plain JS. If you're using TS, then you should use the DateTime type.
Prerequisites
Describe the issue
I noticed that the Typescript
interface Options
differs from the docs.For example:
restrictions?.minDate
is defined as optionalDateTime
in the see https://github.com/Eonasdan/tempus-dominus/blob/5da648d6cd5a469e111ac74ba4d259b6b5b9ab04/src/js/utilities/options.ts#L53The docs however states:
This results in a TS error when using the lib.
StackBlitz fork
https://stackblitz.com/edit/tempus-dominus-v6-repl-vkqxv8?file=example.ts
What operating system(s) are you seeing the problem on?
macOS
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.
v6
What your browser's locale? You can find this information from the sample StackBlitz.
en-*