Skip to content

Date Time Picker: Honour min/max config on the time-zone-aware editors (closes #23372) - #23373

Merged
iOvergaard merged 2 commits into
v17/devfrom
v17/bugfix/23372-datetime-timezone-min-max
Jul 16, 2026
Merged

iOvergaard merged 2 commits into
v17/devfrom
v17/bugfix/23372-datetime-timezone-min-max

Conversation

@AndyButland

@AndyButland AndyButland commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Description

DateTimeWithTimeZonePicker (and its sibling editors that share UmbPropertyEditorUiDateTimePickerElementBase — date-only, time-only, date-time) ignored min/max date constraints supplied via config, while the classic DatePicker (Umbraco.DateTime) respected them. All of these ultimately render umb-input-date, which forwards min/max/step to the native input — but the shared base element never read those values from config nor bound them.

This wires min/max through 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 native datetime-local input silently ignores a date-only bound like 2026-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 a date field treats them.

No new data-type configuration UI is introduced: as with the DatePicker, min/max are 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.

Copilot AI review requested due to automatic review settings July 14, 2026 07:23
@claude

claude Bot commented Jul 14, 2026 •

Copy link
Copy Markdown

Claude encountered an error after 0s —— View job


I'll analyze this and get back to you.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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/max from the property editor config in UmbPropertyEditorUiDateTimePickerElementBase.
  • Normalize min/max to match the active native input type (e.g. expand date-only bounds to start/end-of-day for datetime-local).
  • Add a test asserting normalized min/max are applied for the time-zone-aware datetime-local editor.

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
AndyButland force-pushed the v17/bugfix/23372-datetime-timezone-min-max branch from 67c1ca8 to 95407f3 Compare July 14, 2026 07:27
@AndyButland AndyButland changed the title Date Time Picker: Honor min/max config on the time-zone-aware editors (closes #23372) Date Time Picker: Honour min/max config on the time-zone-aware editors (closes #23372) Jul 14, 2026
…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>
@sonarqubecloud

Copy link
Copy Markdown

@iOvergaard
iOvergaard merged commit 4fd0b23 into v17/dev Jul 16, 2026
32 of 33 checks passed
@iOvergaard
iOvergaard deleted the v17/bugfix/23372-datetime-timezone-min-max branch July 16, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants