[Vuejs]-DueChange event for duet picker not working with Ionic 5 / Vue 3

0👍

I tried to use the duetDatePicker in a Vue CodeSandbox, the following works:

<duet-date-picker
  @duetChange="handleInput"
  identifier="date"
  :localization.prop="localisation_uk"
>

Along with the above, my methods object contained the handleInput function declaration.

Edit vigorous-surf-9uyil

Check the App.vue file in the codesandbox for details.

0👍

I was able to get it to work the old fashion way…

    onMounted(() => {
      // Select the date picker component
      const date = document.getElementById("date-picker");

      // Listen for when date is selected
      date.addEventListener("duetChange", function (e) {
        console.log("selected date", e.detail.valueAsDate);
      });
    });
  <duet-date-picker id="date-picker"
    @duetChange="handleInput"
    identifier="date"
    :localization.prop="localisation_uk"
  >

Leave a comment