Domain Rating by Ahrefs40
Description
Date Picker Svelte is a date and time picker component for Svelte applications. It installs with npm as a development dependency, and it provides a DateInput component, which is a text field that opens a calendar, and a DatePicker component, which is the calendar on its own. The library supports theming through CSS custom properties for the foreground, background, highlight, today and selected colours, and it lets you define custom date formats. It includes internationalisation with a locale prop, and the README lists Norwegian, German and Armenian among the locales built on date-fns. The input supports autopunctuation, so typing a run of digits fills in the separators of the chosen format, and it includes keyboard shortcuts for navigating the calendar. The time precision can be set to minute, second or millisecond, or turned off. The API includes props for an initial browse date, minimum and maximum dates, a placeholder, validity, disabled and required states, whether the picker closes after a selection, whether the user can browse without selecting, and dynamic positioning. A function prop can disable particular dates, and an onselect callback fires when a date is chosen.…
Highlights
- Date and time picker for Svelte
- Custom formats and autopunctuation
- Internationalisation with date-fns locales
- Theming through CSS custom properties
- Keyboard shortcuts and disabled dates
Ratings & Reviews
No ratings yet
Be the first to rate date-picker-svelte.
People also visit
date-picker-svelte FAQ
What is Date Picker Svelte?
A date and time picker component for Svelte applications.
How do I install it?
Run npm install -D date-picker-svelte.
Can I change the look?
Yes. The README lists CSS custom properties for the colours of the picker, such as the selected and today colours.
Does it support other languages?
Yes. A locale prop uses date-fns locales, and the README lists Norwegian, German and Armenian among them.
Can I disable some dates?
Yes. The isDisabledDate prop takes a function that returns true for dates that should be disabled.
Is there a demo?
Yes. The project has a demo, a REPL and documentation on its site.
What are the best date-picker-svelte alternatives?
Popular alternatives to date-picker-svelte include @svelte-plugins/datepicker, vue-datepicker-next and react-datetime. See all date-picker-svelte alternatives














