Replies: 1 comment 7 replies
-
You can customize the format by using an adapter in the createVuetify options. date: {
adapter: LuxonAdapter,
formats: {
keyboardDate: 'yyyy-MM-dd'
},
}, <script setup>
import {ref, watch} from "vue"
import { useDate } from 'vuetify'
const date = useDate()
const model = ref(date.date("2024-01-01"))
watch(model, () => { console.log(model.value) })
</script>
<template>
<v-date-input v-model="model" :hide-actions="true" placeholder="yyyy-mm-dd" />
</template> |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm facing a few challenges with the VDateInput component and would appreciate any guidance.
String format issue:
When I pass a date in the format 2024-12-12 (as a string), the component doesn't seem to parse it correctly. Is there a specific format I should use when binding a string to this input?
Custom date format:
How can I customize the displayed date format in VDateInput to yyyy-MM-dd? I tried setting the format prop, but it doesn’t seem to work as expected. Could someone provide the correct method to achieve this?
Manual input without Enter:
Is there a way to make the date update as soon as the user types, without having to press Enter? Currently, the date only updates after hitting Enter, and I’d like it to trigger an update immediately while typing.
I would greatly appreciate any help or insights regarding these issues!
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions