-
I'm facing a few challenges with the VDateInput component and would appreciate any guidance. String format issue: Custom date format: Manual input without Enter: I would greatly appreciate any help or insights regarding these issues! Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 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.
The latest version adds the displayFormat property, making it even easier.
https://play.vuetifyjs.com/#eNqVU2Fr2zAQ/SuHKNhmtrWsjI2QFAZj3/KpYzCmQYUlxxqSbKRztmD83ydZTsloKau+SLp37/T87vxjIt419DRKVO25/uXJligz9A5hgsZJjvJbwmCG1vUGsjU3Y5ZZ+WdJbXrrEVYA9v8S84lZAOykkVtYzgBCtnzU+DUFM62OHWZlwiiN+7zcRCjzSAJoe2c4+qtIXOewDgchtks67O/g4WaKx/oo8cuo9XfJXV7M1c10j07ZY34BD73FLi/gDWyKeuDiHrnD/F0J2dvsufzPYc+LZ1IfLnqS7JnZuWCWlIu5n4ahDt4EZ3e+cWpA8BLHATS3xz0j6Bm5i6yL7062q9eMBB4j0WlYTY5S9hBScit/wyqI2R1NpUOhcEFpBh2gpezuVEVSpewwYtIZwEZ2vRbSBQHRv8qYSoj4VMRPlemF1AGLzEu0U0JWvEEVhKxtVD6UOlepL2up2IpEof//PjWGvv797RMBL08AfeUEPM1/YQIeP3lHr/wnc0lu6/f15kOYhtv6Y73ZkLLl2ss0HFd/Xgr//AszHiwm