Skip to content

Commit 2c61aac

Browse files
committed
fix: datepicker locale change
1 parent 7e930a1 commit 2c61aac

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@zag-js/date-picker": patch
3+
---
4+
5+
Fix issue where date picker input does not update format when locale changes.

packages/machines/date-picker/src/date-picker.machine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ export const machine = createMachine<DatePickerSchema>({
206206

207207
watch({ track, prop, context, action, computed }) {
208208
track([() => prop("locale")], () => {
209-
action(["setStartValue"])
209+
action(["setStartValue", "syncInputElement"])
210210
})
211211

212212
track([() => context.hash("focusedValue")], () => {

0 commit comments

Comments
 (0)