Skip to main content
Vuetify0 is now in alpha!
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

API reference for the useDate composable.

Explore these related pages for additional context and usage patterns.

PageCategory
useDatePlugins
useLocalePlugins
createPluginFoundation

Functions

createDate

(options: DateOptions<Z>) => E

Creates a new date context.

createDateContext

(options: DateContextOptions<Z>) => ContextTrinity<E>

Creates a new date context trinity.

createDatePlugin

(options: DatePluginOptions<Z>) => import("/home/runner/work/0/0/packages/0/src/composables/index").Plugin

Creates a new date plugin.

useDate

(namespace?: string) => E

Returns the current date context. Requires `createDatePlugin` to be installed with an adapter.

Options

adapter required

DateAdapter<Z>

Date adapter instance.

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
Ctrl+/