[Vuejs]-Vue datepicker returns "1969" value

0👍

I finally was able to solve this question!

when the answered value is "year", eg. 1990, in the mounted lifecycle hook, before assigning it to the data variable, I need to convert the ‘year’ value to a date object.

0👍

The code looks correct for the most part.

Perhaps the input value is not formatted correcty so the default of ‘epoch’ is used.

Or your typos are causing the problem…

lang=selected_language and :initialView=inputType and :minimumView=inputType


    <datepicker placeholder="Select Date" v-model="input" :lang='selected_language'
                :disabledDates="dateParam.disabledDates" :format="customFormatter"
                :minimumView='inputType' :maximumView="'year'" :initialView='inputType'
                ></datepicker>

Leave a comment