Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/probablykasper/date-picker-svelte
Date and time picker for Svelte
https://github.com/probablykasper/date-picker-svelte
calendar date date-picker date-time-picker datepicker package svelte time
Last synced: 2 days ago
JSON representation
Date and time picker for Svelte
- Host: GitHub
- URL: https://github.com/probablykasper/date-picker-svelte
- Owner: probablykasper
- License: mit
- Created: 2021-09-11T00:17:18.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-11-29T17:52:32.000Z (about 1 month ago)
- Last Synced: 2025-01-03T04:06:13.621Z (9 days ago)
- Topics: calendar, date, date-picker, date-time-picker, datepicker, package, svelte, time
- Language: Svelte
- Homepage: https://date-picker-svelte.kasper.space
- Size: 926 KB
- Stars: 322
- Watchers: 6
- Forks: 67
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-svelte - date-picker-svelte - A date and time picker for Svelte with clean UX. (UI Components / Calendar)
README
# Date Picker Svelte
[![NPM](https://img.shields.io/npm/v/date-picker-svelte.svg)](https://npmjs.com/package/date-picker-svelte)
[![License](https://img.shields.io/npm/l/date-picker-svelte.svg)](LICENSE)
[![NPM Downloads](https://img.shields.io/npm/dm/date-picker-svelte.svg)](https://npmjs.com/package/date-picker-svelte)
[![test](https://github.com/probablykasper/date-picker-svelte/actions/workflows/test.yml/badge.svg)](https://github.com/probablykasper/date-picker-svelte/actions/workflows/test.yml)Date and time picker for Svelte
Features:
- Theming
- Custom formats
- Internationalization (i18n)
- Autopunctuation (e.g typing "20201111111111" gives you "2020-11-11 11:11:11" with the default format)
- Keyboard shortcuts[Demo](https://date-picker-svelte.kasper.space/demo) • [Documentation](https://date-picker-svelte.kasper.space/docs) • [REPL](https://svelte.dev/repl/044911429c4b4e659362518d9a5deaae?version=4)
![](Screenshot.png)
## Install
```
npm install date-picker-svelte
```## Usage
```svelte
import { DateInput } from 'date-picker-svelte'
let date = new Date()```
Check the [docs](https://date-picker-svelte.kasper.space/docs) to learn more
## Contributing
### Get started
1. Install Node.js (v14 works)
2. Run `npm install`### Commands
- `npm run dev`: Start site in dev mode
- `npm run build`: Build package and site
- `npm run preview`: Preview production site
- `npm run check`: Run `svelte-check`
- `npm run test`: Run tests
- `npm run format`: Format code### Publish new version
1. Update `CHANGELOG.md`
2. Check for errors
```
npm run lint
```
3. Bump the version number
```
npm version --no-git-tag
```
4. Publish
```
npm publish
```
5. Commit with a tag in format "v#.#.#"
6. Create GitHub release with release notes