From ccfc65717c32cff3eaa9ab0058bf92322298c7dc Mon Sep 17 00:00:00 2001 From: derpierre65 Date: Wed, 22 May 2019 12:48:37 +0200 Subject: [PATCH] Show DatePicker clear button on setDate --- wcfsetup/install/files/js/WoltLabSuite/Core/Date/Picker.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Picker.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Picker.js index d2c3003133..fedb6f6d3a 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Picker.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Picker.js @@ -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'); + } }, /** -- 2.20.1