-
Notifications
You must be signed in to change notification settings - Fork 544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[InputDate] Implement component #2524
Comments
Why are you not considering adding a |
I'm a bit hesitant on this actually, are date pickers not mostly used with buttons instead of inputs? 🤔 |
If buttons do have the edge, it's not by much, in my experience. In companies related to booking trains and flights, it's about even - some allow you to fill in fields directly, others use only buttons. |
I agree with @mehaac My vision of the component: <script setup lang="ts">
const date = ref(new Date())
</script>
<template>
<!-- Default -->
<UDatePicker v-model="date" />
<!-- Replace UInput to UButton -->
<UDatePicker>
<template #default="{ open, date }">
<UButton :label="date.toLocaleDateString()" @click="open = true" />
</template>
</UDatePicker>
</template> |
Renaming this |
https://www.shadcn-vue.com/docs/components/date-picker.html
I think we can just use a
Button
+Popover
+Calendar
for this instead of implementing:The text was updated successfully, but these errors were encountered: