Date Time Picker: Honour min/max config on the time-zone-aware editors (closes #23372) - #23373
Merged
Merged
Conversation
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes parity between the classic DatePicker and the time-zone-aware date/time property editors by wiring min/max constraints from the property editor config through UmbPropertyEditorUiDateTimePickerElementBase into umb-input-date, including normalization so bounds actually constrain the active native input type (notably datetime-local).
Changes:
- Read
min/maxfrom the property editor config inUmbPropertyEditorUiDateTimePickerElementBase. - Normalize
min/maxto match the active native input type (e.g. expand date-only bounds to start/end-of-day fordatetime-local). - Add a test asserting normalized
min/maxare applied for the time-zone-awaredatetime-localeditor.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/Umbraco.Web.UI.Client/src/packages/property-editors/date-time/property-editor-ui-date-time-picker-base.ts |
Plumbs min/max through the shared base and normalizes boundary formats per input type before binding to umb-input-date. |
src/Umbraco.Web.UI.Client/src/packages/property-editors/date-time/property-editor-ui-date-time-picker.test.ts |
Adds test coverage verifying min/max config is applied and normalized for the time-zone-aware datetime-local editor. |
…3372) The DateTimeWithTimeZonePicker and its sibling date-time editors share a base element that never read min/max from config nor bound them to the inner umb-input-date, so configured bounds were silently ignored while the classic DatePicker respected them. Read min/max from config and bind them, normalising each bound to the active input type: a native datetime-local input ignores date-only bounds, so a date-only value is expanded to span the whole day (min -> start, max -> end). Fixes #23372 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
AndyButland
force-pushed
the
v17/bugfix/23372-datetime-timezone-min-max
branch
from
July 14, 2026 07:27
67c1ca8 to
95407f3
Compare
…itors Assert the configured min/max reach umb-input-date correctly for each input type (date, time, datetime-local) and exercise the normalisation branches: date-only day expansion, explicit-time preservation, SQL-style parsing, unparseable pass-through, and absent bounds. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
iOvergaard
approved these changes
Jul 16, 2026
This was referenced Sep 17, 2026
This was referenced Sep 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
DateTimeWithTimeZonePicker(and its sibling editors that shareUmbPropertyEditorUiDateTimePickerElementBase— date-only, time-only, date-time) ignoredmin/maxdate constraints supplied via config, while the classicDatePicker(Umbraco.DateTime) respected them. All of these ultimately renderumb-input-date, which forwardsmin/max/stepto the native input — but the shared base element never read those values from config nor bound them.This wires
min/maxthrough the base element, matching the DatePicker. It also normalises each bound to the active input type, which is necessary for the constraint to take effect: a nativedatetime-localinput silently ignores a date-only bound like2026-07-01, so date-only bounds are expanded to span the whole day — lower bound to the start of the day, upper bound to the end — mirroring how adatefield treats them.No new data-type configuration UI is introduced: as with the DatePicker,
min/maxare read from the property editor's config collection. So this is a developer-focussed update rather than an editor one (matching the behaviour the reporter asked for — parity with the date picker input).Fixes #23372
Testing
See reproduction steps in the linked issue. Adding these two properties to the property data set example should now show both date picker editors respecting the mix/max configuration.