Skip to content

Commit c3b5242

Browse files
committed
use table for shortcuts
1 parent 665cf7a commit c3b5242

File tree

1 file changed

+30
-33
lines changed

1 file changed

+30
-33
lines changed

src/lib/datepicker/datepicker.md

Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -239,44 +239,41 @@ should have a placeholder or be given a meaningful label via `aria-label`, `aria
239239
#### Keyboard shortcuts
240240
The keyboard shortcuts to handle datepicker are:
241241

242-
`ALT` + `DOWN_ARROR`: trigger calendar dialog
243-
244-
`ESCAPE`: close calendar dialog
242+
| Shortcut | Action |
243+
|----------------------|-----------------------------------|
244+
| `ALT` + `DOWN_ARROW` | Open the calendar pop-up |
245+
| `ESCAPE` | Close the calendar pop-up |
245246

246247

247248
In month view:
248249

249-
`LEFT_ARROW`, `RIGHT_ARROW`, `UP_ARROW`, `DOWN_ARROW`: navigate through days
250-
251-
`HOME`: focus the first day of the month
252-
253-
`END`: focus the last day of the month
254-
255-
`PAGE_UP`: goes to previous month
256-
257-
`ALT` + `PAGE_UP`: goes to previous year
258-
259-
`PAGE_DOWN`: goes to next month
260-
261-
`ALT` + `PAGE_DOWN`: goes to next year
262-
263-
`ENTER`: select current focused date
250+
| Shortcut | Action |
251+
|----------------------|-----------------------------------|
252+
| `LEFT_ARROW` | Goes to previous day |
253+
| `RIGHT_ARROW` | Goes to next day |
254+
| `UP_ARROW` | Goes to previous 7 days |
255+
| `DOWN_ARROW` | Goes to next 7 days |
256+
| `HOME` | Focus the first day of the month |
257+
| `END` | Focus the last day of the month |
258+
| `PAGE_UP` | Goes to previous month |
259+
| `ALT` + `PAGE_UP` | Goes to previous year |
260+
| `PAGE_DOWN` | Goes to next month |
261+
| `ALT` + `PAGE_DOWN` | Goes to next year |
262+
| `ENTER` | Select current date |
264263

265264

266265
In year view:
267266

268-
`LEFT_ARROW`, `RIGHT_ARROW`, `UP_ARROW`, `DOWN_ARROW`: navigate through months
269-
270-
`HOME`: focus the first month of the year
271-
272-
`END`: focus the last month of the year
273-
274-
`PAGE_UP`: goes to previous year
275-
276-
`ALT` + `PAGE_UP`: goes to previous 10 years
277-
278-
`PAGE_DOWN`: goes to next year
279-
280-
`ALT` + `PAGE_DOWN`: goes to next 10 years
281-
282-
`ENTER`: select current focused month
267+
| Shortcut | Action |
268+
|----------------------|-----------------------------------|
269+
| `LEFT_ARROW` | Goes to previous month |
270+
| `RIGHT_ARROW` | Goes to next month |
271+
| `UP_ARROW` | Goes to previous 6 months |
272+
| `DOWN_ARROW` | Goes to next 6 months |
273+
| `HOME` | Focus the first month of the year |
274+
| `END` | Focus the last month of the year |
275+
| `PAGE_UP` | Goes to previous year |
276+
| `ALT` + `PAGE_UP` | Goes to previous 10 years |
277+
| `PAGE_DOWN` | Goes to next year |
278+
| `ALT` + `PAGE_DOWN` | Goes to next 10 years |
279+
| `ENTER` | Select current month |

0 commit comments

Comments
 (0)