Skip to main content
Vuetify0 Logo
Theme
Mode
Palettes
Accessibility
Vuetify One
Sign in to Vuetify One

Access premium tools across the Vuetify ecosystem — Bin, Play, Studio, and more.

Not a subscriber? See what's included

useDate API

Date manipulation with a plain JavaScript Date default. Pass V0DateAdapter for Temporal. Locale-aware formatting through an adapter.

Explore these related pages for additional context and usage patterns.

PageCategory
useDatePlugins
useLocalePlugins
createPluginFoundation
createCalendarForms

Functions

createDate

(options?: DateOptions<Z>) => E

createDateContext

(_options?: DateContextOptions<Z>) => ContextTrinity<E>

Creates a new date context trinity.

createDatePlugin

(_options?: DatePluginOptions<Z>) => ObjectPlugin

useDate

(namespace?: string) => E

Returns the current date context. Inside a component with no plugin, returns a V0PlainDateAdapter context. Outside a component, throws. A plugin you installed is used as-is.

Options

adapter

DateAdapter<Z> | undefined

Date adapter instance. Omit it to use V0PlainDateAdapter. Pass V0DateAdapter for Temporal. An adapter you pass is not replaced.

locale

string | undefined

Locale for formatting (defaults to useLocale's selected locale or 'en-US')

locales

Record<string, string> | undefined

Short locale codes mapped to full Intl locale strings (e.g., { en: 'en-US' })

firstDayOfWeek

number | undefined

First day of week override. 0=Sun, 1=Mon, ... 6=Sat. Derived from locale if not set.

Properties

adapter

DateAdapter<Z>

The date adapter instance

locale

ComputedRef<string | undefined>

Current locale (reactive, synced with useLocale if available)

firstDayOfWeek

ComputedRef<number>

First day of week, derived from locale or explicit override

Was this page helpful?

© 2016-1970 Vuetify, LLC
Services
Ctrl+/