vuetifyjs/vuetify · critical · Error

[Vuetify] Could not find injected date options

Error message

[Vuetify] Could not find injected date options

What it means

Thrown by useDate() when inject(DateOptionsSymbol) is undefined. The date adapter is registered globally via `date` config on createVuetify (the VDateAdapter / adapter). Without it, components like VDatePicker/VCalendar cannot format or parse dates.

Source

Thrown at packages/vuetify/src/composables/date/date.ts:123

      // eslint-disable-next-line new-cap
      ? new options.adapter({
        locale: options.locale[locale.current.value] ?? locale.current.value,
        formats: options.formats,
      })
      : options.adapter
  )

  watch(locale.current, value => {
    instance.locale = options.locale[value] ?? value ?? instance.locale
  })

  return instance
}

export function useDate (): DateInstance {
  const options = inject(DateOptionsSymbol)

  if (!options) throw new Error('[Vuetify] Could not find injected date options')

  const locale = useLocale()

  return createInstance(options, locale)
}

View on GitHub (pinned to 8d153908df)

Solutions

  1. Install Vuetify on the app: `app.use(createVuetify({ date: { adapter: VuetifyDateAdapter } }))` (or rely on the default adapter by just calling createVuetify()).
  2. Make sure createVuetify runs before any date-using component mounts.
  3. If using multiple app instances, install Vuetify on each one that renders date components.

Example fix

// before
createApp(App).mount('#app') // no Vuetify

// after
import { createVuetify } from 'vuetify'
const vuetify = createVuetify() // registers default date adapter
createApp(App).use(vuetify).mount('#app')
Defensive patterns

Strategy: type-guard

Validate before calling

import { inject } from 'vue'
import { DateOptionsSymbol } from 'vuetify/composables/date/date'
function hasDateAdapter(): boolean {
  return inject(DateOptionsSymbol, null) != null
}

Type guard

import { inject } from 'vue'
import { DateOptionsSymbol } from 'vuetify/composables/date/date'
function dateAdapterInstalled(): boolean {
  return inject(DateOptionsSymbol, null) != null
}

Try / catch

try {
  useDate()
} catch (e) {
  if (e instanceof Error && /Could not find injected date options/.test(e.message)) {
    // install Vuetify or use a standalone date lib
  } else throw e
}

Prevention

When it happens

Trigger: Calling useDate() (or rendering a component that uses it, e.g. VDatePicker) before createVuetify was called with a `date` adapter, or in an app that has no Vuetify instance installed.

Common situations: Forgetting to install the Vuetify plugin, installing it on a different app instance than the one rendering the date component, SSR setup where the adapter is not registered, or a Vuetify 3 version where the date adapter became required (it is no longer bundled by default).

Related errors


AI-assisted analysis of vuetifyjs/vuetify@8d153908df (2026-08-12). Data as JSON: /api/errors/0cf2bf62423028d7. Report an issue: GitHub.