<DatePicker
v-model="date"
is-expanded
is24hr
:attributes="attrs"
:model-config="{
type: 'string',
mask: 'YYYY-MM-DD HH:mm',
}"
mode="date"
>
</DatePicker>
I attempted to include the "model-config" attribute in my code, but despite having the correct format in the date
variable ("YYYY-MM-DD HH:mm"), it displayed on the screen as "MM-DD-YYYY".
The display on the screen is incorrect: "12-20-2021" => Desired format: "2021-12-20"
The data in the date
variable is correct: "2021-12-20 14:20"
This discrepancy is confusing. How can I modify the display format of this datetime?
Thank you all for your help.
I am using version 2 of v-calendar
.