Invalid Year
ecarrera opened this issue · comments
Hi @mathieustan, I'm currently in Chile (GMT-3) and I think that the GMT difference is giving me a bad format conversion for the year.
I took, by example a year and the shown year is 1 less than the chosen.
This is the implementation:
<vue-date-picker
v-model="fieldData.value"
v-bind="fieldData.settings"
:name="fieldData.label"
:type="fieldData.fieldType"
:fullscreen-mobile="true">
<template #activator="{date}">
<button
:id="key"
:name="fieldData.label"
:placeholder="fieldData.placeholder"
class="form-control form-control-lg d-flex justify-content-between align-items-center">
{{ date ? date : '‌' }}
<font-awesome-icon
icon="calendar"
class="text-muted"
size="sm" />
</button>
</template>
</vue-date-picker>
If I don't use a template the year is fine, but, once the calendar is opened again the selected year on the calendar is 1 year less than the real selection.
Can it be a bug? Am I doing something wrong? Or there is a way to avoid GMT conversions?
Greets.
Hello @ecarrera.
I tried different things, and it seems to work for me. Can you give me a reproduction link ?
https://codesandbox.io/s/peaceful-nobel-cssqq?file=/src/App.vue
@mathieustan look that the year from the #activator is not the picked year, but the value, is OK. The other thing is the shown year in the calendar.
Thank you 👍 I’ll fix this asap.