https://github.com/alexfigliolia/svelte-calendar
A basic date-picker built using svelte
https://github.com/alexfigliolia/svelte-calendar
Last synced: 3 months ago
JSON representation
A basic date-picker built using svelte
- Host: GitHub
- URL: https://github.com/alexfigliolia/svelte-calendar
- Owner: alexfigliolia
- Created: 2023-08-18T20:15:06.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-19T00:26:35.000Z (almost 2 years ago)
- Last Synced: 2025-02-07T15:15:05.007Z (4 months ago)
- Language: Svelte
- Size: 65.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Svelte Calendar
A basic date picker for svelte applications### Installation
```bash
npm i -S @figliolia/svelte-calendar
# or
yarn add @figliolia/svelte-calendar
```
## Usage```html
import { Calendar } from "@figliolia/svelte-calendar";
const onSelect = (date: string) => {
console.log('Selection', date); // ISO time stamp
}```
### API
`onSelect: (date: string) => void`
A callback to run each time a date is selected
`tileSize: number = 30`
A size in pixels to render each date on the calendar. The size of the
calendar component is equal to `7 * tileSize``buttonBG: string = "#fff"`
A color string with used to style **inactive** button backgrounds
`buttonBGActive: string = "#000"`
A color string with used to style **active** button backgrounds
`buttonLabelColor: string = "#000"`
A color string with used to style **inactive** button text
`buttonLabelColorActive: string = "#fff"`
A color string with used to style **active** button text