{"record":{"id":"0cf2bf62423028d7","repo":"vuetifyjs/vuetify","slug":"vuetify-could-not-find-injected-date-options","errorCode":null,"errorMessage":"[Vuetify] Could not find injected date options","messagePattern":"\\[Vuetify\\] Could not find injected date options","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/vuetify/src/composables/date/date.ts","lineNumber":123,"sourceCode":"      // eslint-disable-next-line new-cap\n      ? new options.adapter({\n        locale: options.locale[locale.current.value] ?? locale.current.value,\n        formats: options.formats,\n      })\n      : options.adapter\n  )\n\n  watch(locale.current, value => {\n    instance.locale = options.locale[value] ?? value ?? instance.locale\n  })\n\n  return instance\n}\n\nexport function useDate (): DateInstance {\n  const options = inject(DateOptionsSymbol)\n\n  if (!options) throw new Error('[Vuetify] Could not find injected date options')\n\n  const locale = useLocale()\n\n  return createInstance(options, locale)\n}\n","sourceCodeStart":105,"sourceCodeEnd":129,"githubUrl":"https://github.com/vuetifyjs/vuetify/blob/8d153908dffb7592eb389ddbfbab955a0ccc977f/packages/vuetify/src/composables/date/date.ts#L105-L129","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","solutions":["Install Vuetify on the app: `app.use(createVuetify({ date: { adapter: VuetifyDateAdapter } }))` (or rely on the default adapter by just calling createVuetify()).","Make sure createVuetify runs before any date-using component mounts.","If using multiple app instances, install Vuetify on each one that renders date components."],"exampleFix":"// before\ncreateApp(App).mount('#app') // no Vuetify\n\n// after\nimport { createVuetify } from 'vuetify'\nconst vuetify = createVuetify() // registers default date adapter\ncreateApp(App).use(vuetify).mount('#app')","handlingStrategy":"type-guard","validationCode":"import { inject } from 'vue'\nimport { DateOptionsSymbol } from 'vuetify/composables/date/date'\nfunction hasDateAdapter(): boolean {\n  return inject(DateOptionsSymbol, null) != null\n}","typeGuard":"import { inject } from 'vue'\nimport { DateOptionsSymbol } from 'vuetify/composables/date/date'\nfunction dateAdapterInstalled(): boolean {\n  return inject(DateOptionsSymbol, null) != null\n}","tryCatchPattern":"try {\n  useDate()\n} catch (e) {\n  if (e instanceof Error && /Could not find injected date options/.test(e.message)) {\n    // install Vuetify or use a standalone date lib\n  } else throw e\n}","preventionTips":["Always call app.use(createVuetify()) before mounting.","In SSR, ensure createVuetify runs on both server and client.","Install Vuetify on every createApp that renders date components."],"tags":["vuetify","date","injection","setup"],"backgroundTag":null,"analyzedSha":"8d153908dffb7592eb389ddbfbab955a0ccc977f","analyzedAt":"2026-08-12T21:54:20.596Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}