Skip to content

feat(date-picker): clear a picked date from inside the field - #204

Open
fkrzski wants to merge 2 commits into
NativePHP:mainfrom
fkrzski:feat/clearable-date-picker
Open

fkrzski wants to merge 2 commits into
NativePHP:mainfrom
fkrzski:feat/clearable-date-picker

Conversation

@fkrzski

@fkrzski fkrzski commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

A compact native:date-picker gets a clearable attribute: while it holds a value, an X sits inside the field (beside the calendar icon on Android, beside the date button on iOS), and tapping it sends '' through @change / native:model — the empty value the wire already uses for "nothing chosen" — without opening the dialog; clear-label names the X for screen readers. On Android the transparent box laid over the field to catch its tap would have swallowed the X as well, so the field now opens the dialog from its own interaction source and its accessibility click, and never takes focus, which keeps its resting look. Checked on an Android 14 device and with a new Robolectric test in tests/android, since CI does not build Kotlin. I have no iOS device, so the Swift side follows the existing renderer and is covered only by a source-text test — could someone check it on iOS?

On Android the box laid over the field to catch its tap would swallow
the X too, so the field opens its dialog from its own interaction source.
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