vue-datepicker icon indicating copy to clipboard operation
vue-datepicker copied to clipboard

format-locale is not working

Open wkhr-m opened this issue 1 year ago • 0 comments

Describe the bug I set format-locale to ja (from date-fns/locale). Vue-datepicker input responds only to 2024/02/23(W), not 2024/02/23(水)! (水 is Wednesday in Japanese).

To Reproduce Stackblitz: https://stackblitz.com/edit/vuepic-vue-datepicker-2trljd?file=src%2Fcomponents%2FPlayground.vue

Code:

<template>
  <div>
    <Datepicker
      v-model="date"
      format="yyyy年M月d日(E)"
      model-type="yyyy-MM-dd"
      auto-apply
      :format-locale="ja"
      :text-input="{
        tabSubmit: false,
        format: ['yyyy年M月d日', 'yyyy年M月d日(E)', 'yyyy/M/d', 'yyyy-M-d'],
      }"
    />
    {{ date }}
  </div>
</template>

<script setup>
import { ref } from 'vue';
import Datepicker from '@vuepic/vue-datepicker';
import '@vuepic/vue-datepicker/dist/main.css';
import { ja } from 'date-fns/locale';

const date = ref('2024-03-01');
</script>

Expected behavior Vue-datepicker input responds 2024/03/06(水)!

Screenshots https://github.com/Vuepic/vue-datepicker/assets/43362066/2e0efa2a-73da-4b28-9cf4-cb4578dc3365

Desktop & mobile (please complete the following information):

  • Library version 8.1.1

wkhr-m avatar Mar 04 '24 03:03 wkhr-m