Skip to content
This repository has been archived by the owner on Mar 14, 2021. It is now read-only.

Doesn't work with dayjs@1.10.0 #22

Open
iShotFT opened this issue Jan 3, 2021 · 1 comment
Open

Doesn't work with dayjs@1.10.0 #22

iShotFT opened this issue Jan 3, 2021 · 1 comment

Comments

@iShotFT
Copy link

iShotFT commented Jan 3, 2021

While using this package I've noticed that when you use version 1.10.0 (currently latest release) of dayjs this package stops working. I've not put much thought into this and reverted back to using 1.9.7 after which my application started functioning again.

Command used to downgrade: npm install dayjs@1.9.7 --save

app.js:

import VueTailwindPicker from 'vue-tailwind-picker'
import 'dayjs/locale/nl-be';

EventCreate.vue:

<VueTailwindPicker :formatDate="'DD-MM-YYYY'"
                   :formatDisplay="'DD-MM-YYYY'"
                   :selectedDate="form.day"
                   :start-from-monday="true"
                   :startDate="$date().format('DD-MM-YYYY')"
                   class="z-50"
                   @change="(v) => form.day = v">
    <jet-input id="day" v-model="form.day" class="mt-1 block w-full"
               type="text"/>
</VueTailwindPicker>
@vanderb
Copy link

vanderb commented Jan 12, 2021

Can you specify what exactly "stops working"?

I assume you mean the localization, right?
If so: Importing locale-file isnt enough. you have to set it to dayjs itself

import dayjs from 'dayjs'
import 'dayjs/locale/nl-be';
dayjs.locale('nl-be')

import VueTailwindPicker from 'vue-tailwind-picker'

On my side that do the trick.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants