Skip to content

Conversation

@Tomi-1997
Copy link
Contributor

@Tomi-1997 Tomi-1997 commented Nov 5, 2025

Fixes Backfill date picker randomly changing the date when it is full and then modified.

Closes: #57544

Problem

  • Fill a date picker form, then modify the year.
  • Any subsequent change will increase the other fields (days, or seconds)
    before

Solution

  • Change the parsing process from
    Create day.js from date string
    Convert with timezone to another day.js
  • To
    Create day.js using date string and a timezone
    after

I think consecutive conversions causes an offset to be added, but this seems to fix it.
This keeps the same behavior as before (value as utc, display value as local time)

@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Nov 5, 2025
@eladkal eladkal added this to the Airflow 3.1.3 milestone Nov 6, 2025
@eladkal eladkal added the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Nov 6, 2025
Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

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

Thanks your for the PR.

I tried your change locally and the issue seems to persist for years on my end. Are you using a specific browser for this to work?

I have attached a video. When I edit the time, day or month, everything is fine, when I edit the year, (I tried to input 2024), it resets to 1902then 1900, then 1902, then 1904. (only the last digit is taken into account). Same if I hit delete year before trying a new input value.

Screen.Recording.2025-11-07.at.16.49.15.mov

@Tomi-1997
Copy link
Contributor Author

Hi! This is mainly to fix a bug which is related to the issue you are describing.

When the date is filled, and you try to modify the year, it applies only 1 digit, like you've said, and resets to 1900 or 1901.
Then every subsequent key type, on any field, causes other fields to change.
(On chrome and edge, but can also be produced on fire fox)

Using firefox, it seems the default date picked is used, and modifying the year functions as intended.
However, I still managed to produce the bug:
before-firefox

pierrejeambrun
pierrejeambrun previously approved these changes Nov 20, 2025
Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

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

@Tomi-1997 Thanks for your reply.

I understand that this pull request is fixing the 'other fields' flickering, but the 'year' field remain bugged as mentionned above. Is that outside the scope of this PR and should be treated separately or is this PR supposed to also address that ?

Maybe we can go ahead and merge this fix and follow up with another PR to fix specifically the year field?

@Tomi-1997
Copy link
Contributor Author

@pierrejeambrun
Hi
The 'year' bug is outside the scope of this PR, I also believe it should be addressed in a different PR

@bbovenzi bbovenzi merged commit 83eaca0 into apache:main Nov 20, 2025
61 checks passed
@pierrejeambrun
Copy link
Member

Nice. Weird there is not the CI backport automatic message, as if the backport was not done.

@Tomi-1997 Tomi-1997 deleted the webui-backfill-datepicker branch November 24, 2025 13:22
@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label Dec 1, 2025
ephraimbuddy pushed a commit that referenced this pull request Dec 2, 2025
… object and convert it (#57880)

(cherry picked from commit 83eaca0)
ephraimbuddy pushed a commit that referenced this pull request Dec 3, 2025
… object and convert it (#57880)

(cherry picked from commit 83eaca0)
Copilot AI pushed a commit to jason810496/airflow that referenced this pull request Dec 5, 2025
itayweb pushed a commit to itayweb/airflow that referenced this pull request Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers. backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UI] Datepicker goes crazy if there is validation error

5 participants