Fix the behavior of the date picker on narrow screens
authorAlexander Ebert <ebert@woltlab.com>
Wed, 22 Nov 2023 10:58:08 +0000 (11:58 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 22 Nov 2023 10:58:08 +0000 (11:58 +0100)
See https://www.woltlab.com/community/thread/303036-delayed-publication-buttons-outside-the-area/

ts/WoltLabSuite/Core/Date/Picker.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Date/Picker.js
wcfsetup/install/files/style/ui/datePicker.scss

index 2a2b293aa833c6287af81ee82d4d211d2b38408d..213ace06d892ddf1dca7bcc7ca4f46e2a337331e 100644 (file)
@@ -791,7 +791,7 @@ const DatePicker = {
 
         // create input addon
         const container = document.createElement("div");
-        container.className = "inputAddon";
+        container.className = "inputAddon inputAddonDatePicker";
 
         const openButton = document.createElement("button");
         openButton.type = "button";
index f36eaf956eb9e88a3e9b1635893779c75e91ccfd..caa9a0b78e732bf8557ee77a95fb76990b3ce3d4 100644 (file)
@@ -658,7 +658,7 @@ define(["require", "exports", "tslib", "../Core", "./Util", "../Event/Handler",
                 element.addEventListener("click", open);
                 // create input addon
                 const container = document.createElement("div");
-                container.className = "inputAddon";
+                container.className = "inputAddon inputAddonDatePicker";
                 const openButton = document.createElement("button");
                 openButton.type = "button";
                 openButton.className = "inputSuffix button jsTooltip";
index 8724c99dec14a148e443db728f4d4a6bccecf69b..74a56a5f3dcc54782d873a1aff8cc6dc93399fcc 100644 (file)
                text-align: center;
        }
 }
+
+@include screen-sm-down {
+       .inputAddon.inputAddonDatePicker .inputDatePicker {
+               flex: 1 auto;
+               min-width: auto;
+               width: auto;
+       }
+}