Calendar
If you want to use Calendar
, you must have DateTimeProvider
from @leight/i18n-client
somewhere in the component tree.
Or you can use PageShell or Shell from @leight/mantine.
This package requires Mantine UI (opens in a new tab) provided by @leight/mantine.
This package provides UI for rendering localized calendar. It's based on a great library Luxon (opens in a new tab) providing backend for date/time operations.
Minimal example
All Calendar instances needs (separate) CalendarProvider to work; the reason you must provide you own store is to give you a control over the calendar outside of the component itself.
Calendar defaults to 6 weeks to prevent jumping on months with lesser week count.
Advanced usage
This is full example how calendar works with all it's features; you can list through months/years or pick one or another by standalone date picker.
You can customize basically everything on a calendar, all positions are exposed, just pick the component and see what props are available for you.