Skip to content

Commit

Permalink
refactor: datepicker
Browse files Browse the repository at this point in the history
  • Loading branch information
segunadebayo committed Jan 17, 2025
1 parent c621fb6 commit 4f95c57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .xstate/date-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const fetchMachine = createMachine({
},
"INPUT.CHANGE": [{
cond: "isInputValueEmpty",
actions: ["setInputValue", "clearDateValue"]
actions: ["setInputValue", "clearDateValue", "clearFocusedDate"]
}, {
actions: ["setInputValue", "focusParsedDate"]
}],
Expand Down
2 changes: 1 addition & 1 deletion packages/machines/date-picker/src/date-picker.machine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export function machine(userContext: UserDefinedContext) {
"INPUT.CHANGE": [
{
guard: "isInputValueEmpty",
actions: ["setInputValue", "clearDateValue"],
actions: ["setInputValue", "clearDateValue", "clearFocusedDate"],
},
{
actions: ["setInputValue", "focusParsedDate"],
Expand Down

0 comments on commit 4f95c57

Please sign in to comment.