question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Handling date picker properties in Vue JS

See original GitHub issue

Describe 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:

  1. Create a Vue component that uses duet date picker
  2. 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:closed
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
RiqueBRcommented, Sep 30, 2020

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.

1reaction
viljamiscommented, Sep 29, 2020

@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/

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found