mengxiong10 / vue-datepicker-next

A datepicker / datetimepicker component for Vue3
https://mengxiong10.github.io/vue-datepicker-next/
MIT License
149 stars 35 forks source link

[Question] TypeError: Cannot read properties of undefined (reading 'getFullYear') #66

Open lilz-sofia opened 5 months ago

lilz-sofia commented 5 months ago

Hi, I am trying to migrate from vue2-datepicker to vue-datepicker-next. But I'm getting this following error: TypeError: Cannot read properties of undefined (reading 'getFullYear')

Any idea why this might be occuring?

Vue-datepicker-next version: ^1.0.3 Vue version: 3.4.19 Browser: Chrome

Reproduction Link or Source Code

This is my code:

<template>
  <date-picker
      v-model="fromDatetime"
      class="lg-datepicker"
      type="date"
      :clearable="false"
  />
</template>
<script>
  import moment from "moment";
  import DatePicker from "vue-datepicker-next";

  export default {
    name: "HistoryModal",
    components: {
      DatePicker,
    },
    data: (vm) => ({
      fromDatetime: new Date()
    }),
  }
</script>
ict commented 3 months ago

I think I'm seeing a similar issue, did you ever find a solution?

lilz-sofia commented 2 months ago

@ict I haven't yet :/ I opted for a different library...have you?