From: derpierre65 Date: Wed, 22 May 2019 10:48:37 +0000 (+0200) Subject: Show DatePicker clear button on setDate X-Git-Tag: 5.2.0_Alpha_1~78^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ccfc65717c32cff3eaa9ab0058bf92322298c7dc;p=GitHub%2FWoltLab%2FWCF.git Show DatePicker clear button on setDate --- 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'); + } }, /**