fix bugs
This commit is contained in:
@@ -10,13 +10,12 @@ 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
|
||||
size?: string
|
||||
format?: string
|
||||
inputReadOnly?:boolean
|
||||
inputReadOnly?: boolean
|
||||
}
|
||||
|
||||
const attrs = useAttrs()
|
||||
@@ -41,7 +40,7 @@ const _date = computed({
|
||||
set: (val) => {
|
||||
let temp: string | null = null
|
||||
if (val) {
|
||||
temp = persianToEnglishDigits(val.calendar('gregory').locale('en').format(props.format))
|
||||
temp = val.calendar('gregory').locale('en').format(props.format)
|
||||
}
|
||||
emit('update:value', temp)
|
||||
emit('onchange', temp)
|
||||
|
||||
Reference in New Issue
Block a user