I am trying to use the Vuetify in a vue component and display it in YYYY-MM-DD format.
After importing VDateInput with
import { VDateInput } from 'vuetify/labs/VDateInput';
I use the date picker in the following way:
<v-date-input
:modelValue="getDate"
color="primary"
format="YYYY-MM-DD"
/>
On clicking , it does open the date picker, however, the displayed date is in MM/DD/YYYY format.
Questions:
- How do I change the data format to YYYY-MM-DD. Looks like, I need to do something with getDate(), but how?
- How do I get the selected date from the , and in case I need to pass a date to the date picker, how do I do it?
Thanks for your help.