Show DatePicker clear button on setDate
authorderpierre65 <git@derpierre65.de>
Wed, 22 May 2019 10:48:37 +0000 (12:48 +0200)
committerderpierre65 <git@derpierre65.de>
Wed, 22 May 2019 10:48:37 +0000 (12:48 +0200)
wcfsetup/install/files/js/WoltLabSuite/Core/Date/Picker.js

index d2c3003133fdb20b4e8e9d92a7fd2a449388335b..fedb6f6d3a6992ed9046b19e2e0787c8ad54de74 100644 (file)
@@ -822,8 +822,13 @@ define(['DateUtil', 'EventHandler', 'Language', 'ObjectMap', 'Dom/ChangeListener
                        else {
                                format = 'Y-m-d';
                        }
-                       
+
                        data.shadow.value = DateUtil.format(date, format);
+
+                       // show clear button
+                       if (!data.disableClear) {
+                               data.clearButton.style.removeProperty('visibility');
+                       }
                },
                
                /**