Skip to content

Fix year entry for date in forms#707

Open
SharonStrats wants to merge 6 commits intomainfrom
fix/form-date-year
Open

Fix year entry for date in forms#707
SharonStrats wants to merge 6 commits intomainfrom
fix/form-date-year

Conversation

@SharonStrats
Copy link
Contributor

@SharonStrats SharonStrats commented Mar 15, 2026

When you enter the year in a form it would save before you completed the year and come up with the wrong year. This should fix that.

This happens in a few places, contacts-pane, profile-pane (edit profile), schedulePane probably meeting-pane as well.

I tested this on schedulePane.js in solid-panes and it worked.

SolidOS/solidos#206

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to fix incorrect year values being persisted from HTML date / datetime-local form inputs by changing when basicField triggers saves, to avoid saving intermediate values while the user is still editing the date.

Changes:

  • Detect date / datetime-local input types and introduce deferWhileFocused behavior.
  • Skip saving on change events while the date input still has focus.
  • Avoid disabling date/datetime inputs during the save flow (while preserving the disable behavior for other field types).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI commented Mar 15, 2026

@SharonStrats I've opened a new pull request, #708, to work on those changes. Once the pull request is ready, I'll request review from you.

SharonStrats and others added 3 commits March 15, 2026 19:05
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

@bourgeoa bourgeoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on contacts-pane and works perfectly

@timea-solid
Copy link
Member

@bourgeoa I leave it to you to merge when appropriate. Maybe together with the new contacts-pane work?

@TallTed
Copy link
Contributor

TallTed commented Mar 16, 2026

I cannot test this locally, but as no comment here nor on the related issue discusses this point --

it is rather tedious having to scroll from year 1 to my birthyear

Anywhere a birthdate or similar date picker shows up, it should start with current date values (e.g., year 2026, not year 1), as this will be a far shorter scroll for the user.

@bourgeoa
Copy link
Contributor

@TallTed it starts from current year by default or date already set

@TallTed
Copy link
Contributor

TallTed commented Mar 16, 2026

@bourgeoa — I guess things have changed since 2024, or the "already set" was 1 because of the issue resolved by this PR. All good. :-)

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.

6 participants