Skip to content

Commit

Permalink
Merge pull request #146 from elreco/betterlocale
Browse files Browse the repository at this point in the history
fix: locale import
  • Loading branch information
elreco committed Mar 1, 2024
2 parents 8a9c63b + 3507c52 commit 117ea2a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/DemoLayout.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<script setup>
import 'dayjs/locale/fr'
</script>

<template>
<div class="vp-raw">
<div class="flex flex-col items-center justify-center">
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ This means you only import the specific locale you need directly into your proje

<DemoLayout>
<VueTailwindDatePicker
i18n="id"
i18n="fr"
:auto-apply="false"
:options="options"
v-model="dateValue5"
Expand Down
3 changes: 3 additions & 0 deletions src/VueTailwindDatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1257,6 +1257,9 @@ watchEffect(() => {
}
})
dayjs.locale(props.i18n)
watch(() => props.i18n, () => dayjs.locale(props.i18n))
watchEffect(() => {
const locale = props.i18n
const modelValueCloned = props.modelValue
Expand Down

0 comments on commit 117ea2a

Please sign in to comment.