Fixes the problem that after calling `DatePicker.setDate()` changing the time has...
authorCyperghost <olaf_schmitz_1@t-online.de>
Mon, 14 Oct 2024 09:03:23 +0000 (11:03 +0200)
committerCyperghost <olaf_schmitz_1@t-online.de>
Mon, 14 Oct 2024 09:03:23 +0000 (11:03 +0200)
See https://www.woltlab.com/community/thread/308863-datepicker-setdate-nicht-vollständig/

ts/WoltLabSuite/Core/Date/Picker.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Date/Picker.js

index d35f4a54b464e180a994823ef88e82d656642867..e25035e742eb8678b3172ee244a217588ea27e15 100644 (file)
@@ -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;
index ebb21a9c07ef9dc118b0d56b940a5f04572a0b1e..4b3724bff9fbc7a5b0c67a4c27c239c5cf01f181 100644 (file)
@@ -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) {