Skip to content

feat(pat-date-picker): Introduce new behavior mode "editable". - #1172

Merged
thet merged 5 commits into
masterfrom
date-picker-improvements
Nov 25, 2026
Merged

thet merged 5 commits into
masterfrom
date-picker-improvements

Conversation

@thet

@thet thet commented Jul 10, 2023 •

Copy link
Copy Markdown
Member

Change 2026-11-25: From behavior mode keyboard to behavior mode editable. That's a better fit.

feat(pat-date-picker): Introduce new behavior mode "editable".

With `behavior: editable`, the pattern changes the `type="date"` field to
`type="text"` when it initializes. Users can type a date in `YYYY-MM-DD`
format or choose one from the JavaScript calendar. Set `i18n` to the URL
of a JSON file to translate the calendar. The browser treats typed
values as plain text for constraint validation.

Ref: plone/mockup#1328

@thet
thet marked this pull request as draft July 10, 2023 16:32
@thet
thet force-pushed the date-picker-improvements branch from 73f4035 to 1a3eed0 Compare July 11, 2023 08:00
@thet thet changed the title feat(pat-date-picker): Introduce new behavior mode "input". feat(pat-date-picker): Introduce new behavior mode "keyboard". Jul 11, 2023
thet added 5 commits November 25, 2026 01:25
With `behavior: editable`, the pattern changes the `type="date"` field to
`type="text"` when it initializes. Users can type a date in `YYYY-MM-DD`
format or choose one from the JavaScript calendar. Set `i18n` to the URL
of a JSON file to translate the calendar. The browser treats typed
values as plain text for constraint validation.
With `behavior: editable`, the pattern shows a text field for the date
and a separate browser time field. Users can type the date in
`YYYY-MM-DD` format or choose one from the JavaScript calendar. The
`i18n` option translates the calendar. The browser treats the visible
date field as plain text for constraint validation. The original
`datetime-local` field still holds the combined value for validation and
submission.
@thet
thet force-pushed the date-picker-improvements branch from 1a3eed0 to 0135fb5 Compare November 25, 2026 00:31
@thet thet changed the title feat(pat-date-picker): Introduce new behavior mode "keyboard". feat(pat-date-picker): Introduce new behavior mode "editable". Nov 25, 2026
@thet
thet marked this pull request as ready for review November 25, 2026 00:36
@thet
thet merged commit 88b4d59 into master Nov 25, 2026
1 check passed
@thet
thet deleted the date-picker-improvements branch November 25, 2026 00:37
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