Skip to content

Commit 7e13a8d

Browse files
Use numeric keyboard in time field
1 parent 90f4175 commit 7e13a8d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Next
44
- Fix time field sometimes showing a value outside `min`/`max`
55
- Fix time field losing highlight after pressing left/right arrow keys
6+
- Use numeric keyboard in time field
67

78
## 2.10.1 - 2023 Dec 6
89
- Fix view not updating when value changes externally with `browseWithoutSelecting`

src/lib/TimePicker.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@
153153
aria-label="Hours"
154154
tabindex="0"
155155
contenteditable
156+
inputmode="numeric"
156157
on:keydown={keydown}
157158
on:input={input}
158159
on:focus={focus}>{('00' + browseDate.getHours()).slice(-2)}</span
@@ -163,6 +164,7 @@
163164
aria-label="Minutes"
164165
tabindex="0"
165166
contenteditable
167+
inputmode="numeric"
166168
on:keydown={keydown}
167169
on:input={input}
168170
on:focus={focus}>{('00' + browseDate.getMinutes()).slice(-2)}</span
@@ -174,6 +176,7 @@
174176
aria-label="Seconds"
175177
tabindex="0"
176178
contenteditable
179+
inputmode="numeric"
177180
on:keydown={keydown}
178181
on:input={input}
179182
on:focus={focus}>{('00' + browseDate.getSeconds()).slice(-2)}</span
@@ -185,6 +188,7 @@
185188
aria-label="Milliseconds"
186189
tabindex="0"
187190
contenteditable
191+
inputmode="numeric"
188192
on:keydown={keydown}
189193
on:input={input}
190194
on:focus={focus}>{('000' + browseDate.getMilliseconds()).slice(-3)}</span

0 commit comments

Comments
 (0)