Sqrrl / wc-datepicker

A small, accessible and customizable datepicker written in TypeScript.
https://sqrrl.github.io/wc-datepicker
MIT License
55 stars 7 forks source link

[QUESTION] … how to define a default range? #14

Closed BenRej closed 1 year ago

BenRej commented 1 year ago

Hello!

I would like to know how we can define a default range to the datepicker? I try to manage this by setting the value but it's not working.

thank you.

Sqrrl commented 1 year ago

Hey. You can set a range value by providing a tuple of Date objects.

datepicker.value = [new Date(), new Date('01-01-2024')];
BenRej commented 1 year ago

thank you it works wonderfully