Skip to content

Initial date option#7

Open
jarmo wants to merge 5 commits into
MathiasWP:masterfrom
jarmo:initial-date-option
Open

Initial date option#7
jarmo wants to merge 5 commits into
MathiasWP:masterfrom
jarmo:initial-date-option

Conversation

@jarmo
Copy link
Copy Markdown

@jarmo jarmo commented Mar 27, 2022

Add support for specifying initial date instead of today via options.

@MathiasWP
Copy link
Copy Markdown
Owner

Is it a good idea to use Infinity? new Date(Infinity) resolves to an invalid date.

@jarmo
Copy link
Copy Markdown
Author

jarmo commented Jun 20, 2022

@MathiasWP yes, giving Infinity or -Infinity to Date constructor would cause invalid date, but it will never happen with this code. Infinity and -Infinity are just used so that Math.min and Math.max would work as needed.

If you think that invalid date might happen then please give me an example of all the values of options.date, options.min and options.max causing this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants