Skip to content

fix(time-picker): reject popup changes while disabled - #986

Merged
jaywcjlove merged 1 commit into
uiwjs:masterfrom
Xapollon430:codex/guard-disabled-timepicker
Nov 12, 2026
Merged

jaywcjlove merged 1 commit into
uiwjs:masterfrom
Xapollon430:codex/guard-disabled-timepicker

Conversation

@Xapollon430

Copy link
Copy Markdown
Contributor

Fixes #985.

Problem

  1. Open an enabled TimePicker with 10:00 selected.
  2. Set disabled to true while its popup is visible.
  3. Click hour 11. The disabled input changes to 11:00 and emits onChange.

An async parent update can disable the picker while someone is choosing a time. The popup selection handler now checks the current disabled prop before updating the time or notifying the app.

Browser recording

I found this class of interaction while testing state transitions in Anta, then reproduced this case in UIW.

Validation

Built current TimePicker source with the UIW styles. Real Chrome clicks change 10:00 to 11:00 on master and emit one event. The fixed build retains 10:00 with zero events after disabling. The same option works after re-enabling and reopening the popup.

AI-assisted implementation and testing.

@jaywcjlove
jaywcjlove merged commit b88f9b1 into uiwjs:master Nov 12, 2026
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.

TimePicker can change the selected time after being disabled while open

2 participants