Skip to content

Conversation

lauraneto
Copy link
Contributor

Exploring options for a time zone aware date time property editor.
Work in progress.

lauraneto added 30 commits July 22, 2025 15:36
…. Display UTC offset instead of short offset name in label.
@umbraco umbraco deleted a comment from github-actions bot Aug 14, 2025
Comment on lines +83 to +86
label=${this.localize.string(item.label) +
(item.invalid ? ` (${this.localize.term('validation_legacyOption')})` : '')}
title=${item.invalid ? this.localize.term('validation_legacyOptionDescription') : ''}>
</uui-radio>
Copy link
Contributor Author

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.

object? dataTypeConfiguration,
PropertyValidationContext validationContext)
{
if (value is not JsonObject valueAsJsonObject)
Copy link
Contributor Author

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? 🤔

Comment on lines 37 to 45
export interface UmbDateTimeWithTimeZone {
date: string | undefined;
timeZone: string | undefined;
}

export interface UmbTimeZonePickerValue {
mode: 'all' | 'local' | 'custom';
timeZones: Array<string>;
}
Copy link
Contributor Author

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?

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