Skip to content

Commit

Permalink
Fix input-date losing value on invalid input
Browse files Browse the repository at this point in the history
  • Loading branch information
sdvg authored Jul 19, 2024
2 parents 4c773e0 + ee726bd commit c134b7a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/components/src/components/input-date/shadow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -438,11 +438,7 @@ export class KolInputDate implements InputDateAPI, FocusableElement {
if (value instanceof Date) {
deprecatedHint('Date type will be removed in v3. Use `Iso8601` instead.');
}
this.controller.validateValueEx(value, (v) => {
if (v === '' && this.inputRef) {
this.inputRef.value = '';
}
});
this.controller.validateValueEx(value);
}

public componentWillLoad(): void {
Expand Down

0 comments on commit c134b7a

Please sign in to comment.