mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix(components): [el-date-picker] panel not select value enter error (#3768)
This commit is contained in:
@@ -188,7 +188,7 @@ import MonthTable from './basic-month-table.vue'
|
||||
import YearTable from './basic-year-table.vue'
|
||||
|
||||
import type { PropType } from 'vue'
|
||||
import type { Dayjs, ConfigType } from 'dayjs'
|
||||
import type { ConfigType, Dayjs } from 'dayjs'
|
||||
import type { IDatePickerType } from '../date-picker.type'
|
||||
|
||||
// todo
|
||||
@@ -512,9 +512,11 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
const isValidValue = (date_) => {
|
||||
const isValidValue = (date: unknown) => {
|
||||
return (
|
||||
date_.isValid() && (disabledDate ? !disabledDate(date_.toDate()) : true)
|
||||
dayjs.isDayjs(date) &&
|
||||
date.isValid() &&
|
||||
(disabledDate ? !disabledDate(date.toDate()) : true)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user