fix error in update me

This commit is contained in:
2026-07-16 11:36:16 +03:30
parent 14d0285847
commit 62414cac88
4 changed files with 129 additions and 108 deletions
@@ -9,6 +9,8 @@ import DatePicker from './datePick'
import locale from 'ant-design-vue/es/date-picker/locale/fa_IR'
import dayjs, { Dayjs } from 'dayjs'
import { omit } from 'lodash'
import { computed, useAttrs } from 'vue'
import { persianToEnglishDigits } from '@/utils/persianDigits'
interface Props {
value?: string | Dayjs
@@ -26,7 +28,7 @@ const _attrs = computed(() => {
const props = withDefaults(defineProps<Props>(), {
value: '',
format: 'YYYY/MM/DD',
format: 'YYYY-MM-DD',
inputReadOnly:true
})
@@ -39,7 +41,7 @@ const _date = computed({
set: (val) => {
let temp: string | null = null
if (val) {
temp = val.calendar('gregory').locale('en').format(props.format)
temp = persianToEnglishDigits(val.calendar('gregory').locale('en').format(props.format))
}
emit('update:value', temp)
emit('onchange', temp)