diff --git a/lib/datetime-picker/src/component/date-picker.tsx b/lib/datetime-picker/src/component/date-picker.tsx index f28a1286fb..f62b138843 100644 --- a/lib/datetime-picker/src/component/date-picker.tsx +++ b/lib/datetime-picker/src/component/date-picker.tsx @@ -32,9 +32,9 @@ export class DatePicker extends return this._date; } - setDate = (value: string) => { + setDate = (value: string, force?: boolean) => { const {disabled, readonly} = this.props; - if (disabled || readonly) { + if (!force && (disabled || readonly)) { return; } @@ -51,7 +51,7 @@ export class DatePicker extends trigger._skipTriggerChange = value; } } - return this.setDate(value) as Promise; + return this.setDate(value, true) as Promise; } _calcValue(value: string): string {