From: Cyperghost Date: Mon, 14 Oct 2024 09:03:23 +0000 (+0200) Subject: Fixes the problem that after calling `DatePicker.setDate()` changing the time has... X-Git-Tag: 6.0.18~2^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4c48a0a39397cc3b19d9c0f5a1e4c086e3b10b9c;p=GitHub%2FWoltLab%2FWCF.git Fixes the problem that after calling `DatePicker.setDate()` changing the time has no effect See https://www.woltlab.com/community/thread/308863-datepicker-setdate-nicht-vollständig/ --- diff --git a/ts/WoltLabSuite/Core/Date/Picker.ts b/ts/WoltLabSuite/Core/Date/Picker.ts index d35f4a54b4..e25035e742 100644 --- a/ts/WoltLabSuite/Core/Date/Picker.ts +++ b/ts/WoltLabSuite/Core/Date/Picker.ts @@ -911,6 +911,7 @@ const DatePicker = { const data = _data.get(element) as DatePickerData; element.dataset.value = date.getTime().toString(); + element.dataset.empty = "false"; let format = ""; let value: string; diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Picker.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Picker.js index ebb21a9c07..4b3724bff9 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Picker.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Picker.js @@ -759,6 +759,7 @@ define(["require", "exports", "tslib", "../Core", "./Util", "../Dom/Change/Liste element = getElement(element); const data = _data.get(element); element.dataset.value = date.getTime().toString(); + element.dataset.empty = "false"; let format = ""; let value; if (data.isDateTime) {