useDate
Parses a value into a DateInstance using the configured date adapter. Returns the current date when called without arguments. Setup-only when called without vueform.
ts
/**
* Parses a value into a `DateInstance` using the configured date adapter.
* Returns the current date when called without arguments. Setup-only when
* called without `vueform`.
*
* @param value The date value to parse (e.g. `Date`, ISO string, timestamp).
* @param format Optional format string (requires a date format plugin).
* @param vueform The Vueform instance to resolve from. Required outside a
* component context.
*/
function useDate(
value?: any,
format?: string,
vueform?: VueformInstance
): DateInstanceParams
The arguments accepted by the composable.
| Name | Description |
|---|---|
value? | The date value to parse (e.g. Date, ISO string, timestamp). |
format? | Optional format string (requires a date format plugin). |
vueform? | The Vueform instance to resolve from. Required outside a component context. |