Basic Usage
A simple date-only picker with the default behavior.
An extended date picker component with time picker support.
npx shadcn-vue@latest add https://dsn-ui.pages.dev/r/dsn-date-picker.jsonA simple date-only picker with the default behavior.
Enable time selection and keep Monday as the first day of week.
Show dropdowns for month and year selection to improve navigation.
Restrict selectable dates by setting a minimum and maximum.
Override default UI labels to match your product language.
Adjust date style and separator for date-time display.
Customize placeholder while keeping locale-aware formatting.
Listen to the clear event to trigger side effects when the user resets the date.
| Prop | Type | Description |
|---|---|---|
| v-model | string | undefined Default: undefined | Selected date value. Date-only mode emits YYYY-MM-DD, time mode can emit ISO datetime. Example: 2026-04-12 or 2026-04-12T09:45:00.000Z |
| timePicker | boolean Default: false | Show time controls below the calendar. Example: true |
| minValue | string | Date | DateValue Default: undefined | Minimum selectable date. Example: 2026-04-10 |
| maxValue | string | Date | DateValue Default: undefined | Maximum selectable date. Example: 2026-04-20 |
| placeholder | string Default: undefined | Custom placeholder for the trigger input. Example: Select delivery date |
| layout | LayoutTypes Default: undefined | Control month and year dropdown selector. Options: month-and-year | year-only | month-only. Example: month-and-year |
| clearable | boolean Default: false | Show clear actions for date and time. Example: true |
| locale | string Default: en-US | Locale used for date formatting and language key fallback. Any valid BCP 47 locale. Example: id-ID |
| dateStyle | Intl.DateTimeFormatOptions['dateStyle'] Default: medium | Controls date formatting style. Possible values: full | long | medium | short. Example: long |
| dateTimeSeparator | string Default: - | Text between formatted date and selected time. Example: | |
| weekStartsOn | WeekStartsOn Default: 0 | First day of week. Possible values: 0 | 1 | 2 | 3 | 4 | 5 | 6 (where 0 = Sunday and 1 = Monday). Example: 1 |
| lang | Partial<LangItems> Default: undefined | Override internal labels for UI text. Keys: pick_date, clear_time, clear_date, select_time, close_date_picker, close_btn. Example: { close_btn: "Tutup" } |
| Event | Payload | Description |
|---|---|---|
| @clear | void | Triggered when the user clicks the clear button to reset the value. |