Calendar
A date field component that allows users to enter and edit date.
November 2024
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
27 | 28 | 29 | 30 | 31 | 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
If you're looking for previous Calendar implementation, checkout to VCalendar component
About
The <Calendar />
component is built on top of the RadixVue Calendar component, which uses the @internationalized/date package to handle dates.
If you're looking for a range calendar, check out the Range Calendar component.
Installation
bash
npx shadcn-vue@latest add calendar
TIP
The component depends on the @internationalized/date package, which solves a lot of the problems that come with working with dates and times in JavaScript. Check Dates & Times in Radix Vue for more information and installation instructions.
Datepicker
You can use the <Calendar />
component to build a date picker. See the Date Picker page for more information.
Examples
Form
Advanced Customization
Month & Year Selects
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
27 | 28 | 29 | 30 | 31 | 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |