Let the calendar jump to any month or year, in both directions
Clicking the month or year label only ever stepped forward (`month + 1`, `year + 1`), so the only way back was the prev-month arrow, one month at a time. Jumping back a year was impossible. Both labels are now selects, so any month or year is one click away in either direction. Selects rather than +/- steppers because the app already uses them elsewhere, and because stepping in a second direction would still not give the "quickly jump" part of the original intent. Year options are bounded to 2026-2055, the calendar cache range: outside it the backend raises UncachedYearError and returns 422, so offering those years would hand the user an error instead of a calendar. The prev/next month arrows are unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RXMhc9nT6sNz1SL4j8dznL
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
export const calendar = {
|
||||
'calendar.advanceMonthAria': '{month} - click to advance month',
|
||||
'calendar.advanceYearAria': '{year} - click to advance year',
|
||||
'calendar.selectMonthAria': 'Select month',
|
||||
'calendar.selectYearAria': 'Select year',
|
||||
'calendar.deleteError': 'Failed to delete the planned day',
|
||||
'calendar.legendDoubleDay': 'Double day',
|
||||
'calendar.legendIncomeBased': 'Income-based rate (sjukpenningnivå)',
|
||||
|
||||
Reference in New Issue
Block a user