Handling date picker properties in Vue JS
See original GitHub issueDescribe the bug Thank you very much for all your hard work, this date picker is incredibly neat!
I’ve been trying to implement this date picker into a Vue JS project. I’m a bit new and as I understand from your documentation, in order to use the properties of duet date picker (e.g. Localization, dateAdapter, direction, etc.) I need to override their defaults. I’ve been trying to add them as props to my component but so far no luck. Is this a bug or just a gap on my own understanding?
To Reproduce Steps to reproduce the behavior:
- Create a Vue component that uses duet date picker
- Pass localization object as a prop
Expected behavior I expect the placeholder to change it’s label from “YYYY-MM-DD” to “DD/MM/YYYY”
Desktop (please complete the following information):
- OS: Catalina 10.5.15
- Browser: [Chrome, FF, IE11, Safari]
- Version: Duet date-picker version 1.0.1
Additional context Component in case:
<duet-date-picker
ref="date-picker"
identifier="date"
direction="left"
:value="enteredDate"
v-bind:class="{'has-error': hasErrors}"
v-bind:required="isRequired"
:name="name"
:localization="{placeholder: 'DD/MM/YYYY'}"
:dateAdapter="format_date()"
@duetChange="dateChanged"
/>
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
vuejs-datepicker - npm
A simple Vue.js datepicker component. Supports disabling of dates, inline mode, translations. Latest version: 1.6.2, last published: 4 years ...
Read more >Comparing Vue.js date pickers - LogRocket Blog
Learn which Vue.js date pickers are best for your booking or logistics application to provide useful yet stylish user experiences.
Read more >Date picker component — Vuetify
v-date-picker is a fully featured date selection component that lets users select a date, or range of dates. # Usage. Date pickers come...
Read more >How to Implement Datepicker in Vue 2 Application - positronX.io
We will show you how to whimsically add the date picker widget in the vue js application using the vuejs-datepicker package.
Read more >Form Datepicker | Components - BootstrapVue
<b-form-datepicker> is a BootstrapVue custom date picker input form control, which provides full WAI-ARIA compliance and internationalization support.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @viljamis @WickyNilliams, thank you so much for this! I’ll send a wee update of the docs to reflect this at some point this week.
@WickyNilliams @RiqueBR The first issue I see here is that you can’t change just one value inside the localization object. You need to pass in the whole object for things to work. Please see the last example on this page: https://duetds.github.io/date-picker/