fix: datePicker support empty, close #6510
parent
80fbabc66f
commit
858169aee3
|
@ -315,7 +315,11 @@ function RangerPicker<DateType>() {
|
|||
|
||||
// Fill disabled unit
|
||||
for (let i = 0; i < 2; i += 1) {
|
||||
if (mergedDisabled.value[i] && !getValue(postValues, i) && !getValue(props.allowEmpty, i)) {
|
||||
if (
|
||||
mergedDisabled.value[i] &&
|
||||
!getValue(postValues, i) &&
|
||||
!getValue(props.allowEmpty, i)
|
||||
) {
|
||||
postValues = updateValues(postValues, props.generateConfig.getNow(), i);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,6 +123,7 @@ function findTargetStr(val: string, index: number, segmentation: string) {
|
|||
}
|
||||
|
||||
const toDateWithValueFormat = (val: string | Dayjs, valueFormat: string) => {
|
||||
if (!val) return null;
|
||||
if (dayjs.isDayjs(val)) {
|
||||
return val;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue