Skip to content

Improved controls for date#885

Merged
hiddewie merged 4 commits intomasterfrom
improve-date-selection
Apr 4, 2026
Merged

Improved controls for date#885
hiddewie merged 4 commits intomasterfrom
improve-date-selection

Conversation

@hiddewie
Copy link
Copy Markdown
Owner

@hiddewie hiddewie commented Apr 4, 2026

For #719

This pull request increases the control over the selected date value.

The shown date can be selected by the slider or by inputting a year manually by clicking the value and typing a value. The input is a number, so the "up" and "down" arrows can also be used, or the up and down keyboard keys. It depends on the browser how it looks visually.

Holding the "up" or "down" arrow will smoothly move the slider forwards or backwards together with the shown year.

If invalid values are manually input, like 100, 2222 or bla, the selected date is reset to the nearest valid value.

All dates:
image

Historical date:
image

Present date:
image

Small screens show only the date selection by default. Clicking the date icon toggles this feature:
image

For #719

This pull request increases the control over the selected date value.

The shown date can be selected by the slider or by inputting a year manually by clicking the value and typing a value. The input is a number, so the "up" and "down" arrows can also be used (depends on the browser how it looks visually).

If invalid values are manually input, like `100`, `2222` or `bla`, the selected date is reset to the nearest valid value.
@hiddewie hiddewie marked this pull request as ready for review April 4, 2026 20:18
@hiddewie hiddewie merged commit 5035433 into master Apr 4, 2026
2 checks passed
@hiddewie hiddewie deleted the improve-date-selection branch April 4, 2026 21:11
detective-fiasco pushed a commit to detective-fiasco/OpenRailwayMap-vector that referenced this pull request Apr 8, 2026
For hiddewie#719

This pull request increases the control over the selected date value.

The shown date can be selected by the slider or by inputting a year
manually by clicking the value and typing a value. The input is a
number, so the "up" and "down" arrows can also be used, or the up and
down keyboard keys. It depends on the browser how it looks visually.

Holding the "up" or "down" arrow will smoothly move the slider forwards
or backwards together with the shown year.

If invalid values are manually input, like `100`, `2222` or `bla`, the
selected date is reset to the nearest valid value.

All dates:
<img width="923" height="427" alt="image"
src="https://github.com/user-attachments/assets/a04bc86a-e12e-47e9-87ae-4704b0d95ab9"
/>

Historical date:
<img width="923" height="427" alt="image"
src="https://github.com/user-attachments/assets/e44f9e1f-a987-407f-a73b-6d46d6d6839d"
/>

Present date:
<img width="923" height="427" alt="image"
src="https://github.com/user-attachments/assets/23b10b55-3431-43a4-adef-4da329c3a69c"
/>

Small screens show only the date selection by default. Clicking the date
icon toggles this feature:
<img width="561" height="427" alt="image"
src="https://github.com/user-attachments/assets/6982b76d-da44-4b57-96a8-637635d58a8f"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant