Skip to content

Commit 215a4d0

Browse files
committed
docs: Update wrong import for the locale prop, update migration guide (fixes #1174)
1 parent 6b45ec6 commit 215a4d0

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

docs/migration/from-v11.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,14 @@ Prop type is changed, and no longer provides arguments if a function is provided
224224

225225
Locale prop type is changed, and will now only accept `date-fns` `Locale` object.
226226

227+
If you don't have it in the project, you can install it via `npm install date-fns`
228+
229+
and then import it:
230+
231+
```ts
232+
import { znCh } from 'date-fns/locale'
233+
```
234+
227235
### `disable-month-year-select`
228236

229237
This prop is renamed to `hide-month-year-select`

docs/props/localization/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Based on specified formats in [`formats`](/props/formatting/#formats) prop, the
3232
3333
<script setup>
3434
import { VueDatePicker } from "@vuepic/vue-datepicker"
35-
import { zhCn } from "@vuepic/vue-datepicker/locale"
35+
import { zhCn } from "date-fns/locale"
3636
import { ref } from 'vue';
3737
3838
const date = ref(new Date());

0 commit comments

Comments
 (0)