talkhabi/vue-persian-datetime-picker

timezone string values results in parseZone() and clone() not a function error .

DevIsShortForDevil opened this issue · 1 comments

Hi , I'm using the timezone feature with string prop values . but doing this results in
talkhabi-vue-datepicker-errors-1 on load . it works fine with Booleans , but also has these errors with functions.
here are the props on the datepicker :

<VuePersianDatetimePicker
      v-model="internalValue"
      :timezone="'+04:30'"
      clearable
      :locale="'fa,en'"
      :locale-config="{
          fa: {
            displayFormat: this.displayTime ? 'jYYYY/jMM/jDD HH:mm' : 'jYYYY/jMM/jDD',
            lang: { label: 'شمسی' },
          },
          en: {
            displayFormat: this.displayTime ? 'YYYY/MM/DD HH:mm' : 'YYYY/MM/DD',
            lang: { label: 'Gregorian' },
          },
        }"
      format="YYYY-MM-DD HH:mm:ss"
      :type="'datetime'"
    /> 

I checked the source code but couldn't find anything and really appreciate it if you could look into this.

I think this will be solved if you import moment from 'moment-timezone' or a jalaali version of it instead of 'moment' or 'moment-jalaali'