-
Notifications
You must be signed in to change notification settings - Fork 2.8k
WIP: Time zone support for date time picker #19915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v17/dev
Are you sure you want to change the base?
WIP: Time zone support for date time picker #19915
Conversation
…. Display UTC offset instead of short offset name in label.
src/Umbraco.Core/PropertyEditors/DateTimeWithTimeZonePropertyEditor.cs
Outdated
Show resolved
Hide resolved
label=${this.localize.string(item.label) + | ||
(item.invalid ? ` (${this.localize.term('validation_legacyOption')})` : '')} | ||
title=${item.invalid ? this.localize.term('validation_legacyOptionDescription') : ''}> | ||
</uui-radio> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should do a separate PR just with this change.
This adds support for localization of radio button labels.
…ic for the property editor
…nger available, instead of pre-selecting another one
This most likely means that the configuration of the editor changed to add time zone support. In this case we want to force the editor to select the applicable time zone.
object? dataTypeConfiguration, | ||
PropertyValidationContext validationContext) | ||
{ | ||
if (value is not JsonObject valueAsJsonObject) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just testing this and noticed that when the value is being saved, the value received is a JsonObject
, but when it is being published it is a string (it seems to be what is stored in the database).
In both occasions the valueType
is STRING
.
I'm wondering whether I should also add validation to the provided string? Or should I actually only be validating the string, and not when the value is saved? 🤔
export interface UmbDateTimeWithTimeZone { | ||
date: string | undefined; | ||
timeZone: string | undefined; | ||
} | ||
|
||
export interface UmbTimeZonePickerValue { | ||
mode: 'all' | 'local' | 'custom'; | ||
timeZones: Array<string>; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should probably move next to the property editor, as they are not shared?
Exploring options for a time zone aware date time property editor.
Work in progress.