CalendarPickerJS icon indicating copy to clipboard operation
CalendarPickerJS copied to clipboard

Initial date option

Open jarmo opened this issue 3 years ago • 2 comments

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

jarmo avatar Mar 27 '22 11:03 jarmo

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

MathiasWP avatar Jun 20 '22 11:06 MathiasWP

@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.

jarmo avatar Jun 20 '22 12:06 jarmo