6eDesign / svelte-calendar

A lightweight datepicker with neat animations and a unique UX.
https://6edesign.github.io/svelte-calendar/
MIT License
543 stars 90 forks source link

Some extra props #138

Closed multipliedtwice closed 2 years ago

multipliedtwice commented 3 years ago

Hello, thank you for the awesome library. Do you have any plans to add any of the following:

  1. startAt - for example to open the calendar on 18 years ago date?
  2. allow to input use Unix timestamp as a selectedDate?
jonathangreenemeier-vizio commented 2 years ago

For #1, this is possible by setting or binding the selectedProp to a specific date: https://svelte.dev/repl/0c1cbd9bb5ee4be2a65fd843d2427c6b?version=3.44.1

You may have to adjust the start and end properties (date boundaries) if the start date it outside of the defaults. See the props documentation for more details.

I'm not quite sure what you mean by #2.

multipliedtwice commented 2 years ago

Thank you.