diff --git a/src/Umbraco.Web.UI.Client/src/packages/property-editors/date-picker/property-editor-ui-date-picker.element.ts b/src/Umbraco.Web.UI.Client/src/packages/property-editors/date-picker/property-editor-ui-date-picker.element.ts index b32cf266c4..306a389797 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/property-editors/date-picker/property-editor-ui-date-picker.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/property-editors/date-picker/property-editor-ui-date-picker.element.ts @@ -43,7 +43,6 @@ export class UmbPropertyEditorUIDatePickerElement extends UmbLitElement implemen set value(value: string | undefined) { // Replace the potential time demoninator 'T' with a whitespace for backwards compatibility this.#value = value?.replace('T', ' '); - console.log('got value', value, 'translated to', this.#value); } get value() { return this.#value; @@ -68,10 +67,15 @@ export class UmbPropertyEditorUIDatePickerElement extends UmbLitElement implemen this._max = config.getValueByAlias('max'); this._step = config.getValueByAlias('step'); - // If the inputType is only 'date' we need to make sure the value doesn't have a time + // If the inputType is 'date', we need to make sure the value doesn't have a time if (this._inputType === 'date' && this.value?.includes(' ')) { this.value = this.value.split(' ')[0]; } + + // If the inputType is 'time', we need to remove the date part of the value + if (this._inputType === 'time' && this.value?.includes(' ')) { + this.value = this.value.split(' ')[1]; + } } #onChange(event: CustomEvent & { target: UmbInputDateElement }) {