Skip to content

Commit

Permalink
feat(canary-web-components): add the ability to backspace through a d…
Browse files Browse the repository at this point in the history
…ate input to delete the date

Add the ability to backspace through a date input to delete the date, using moveToPreviousInput
after the last character has been deleted

. #2244
  • Loading branch information
GCHQ-Developer-530 committed Feb 24, 2025
1 parent 5994d97 commit c9042b4
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,12 @@ export class DateInput {
this.preventAutoFormatting = true;
this.handleUpDownArrowKeyPress(input, event);
break;
case "backspace":
if (input.value.length === 0) {
event.preventDefault();
this.moveToPreviousInput(input);
}
break;
default:
break;
}
Expand Down

0 comments on commit c9042b4

Please sign in to comment.