timezone string values results in parseZone() and clone() not a function error .
DevIsShortForDevil opened this issue · 1 comments
DevIsShortForDevil commented
Hi , I'm using the timezone feature with string prop values . but doing this results in
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.
DevIsShortForDevil commented
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'