From: Alexander Ebert Date: Thu, 31 Jan 2013 22:20:02 +0000 (+0100) Subject: date picker no longer sets a value if empty X-Git-Tag: 2.0.0_Beta_1~522 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=645231ef2d4033f7943d49825c503494e8e2c738;p=GitHub%2FWoltLab%2FWCF.git date picker no longer sets a value if empty --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 4f004cf6c8..e3aa812714 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -2089,6 +2089,10 @@ WCF.Date = {}; * Provides a date picker for date input fields. */ WCF.Date.Picker = { + /** + * date format + * @var string + */ _dateFormat: 'yy-mm-dd', /** @@ -2188,7 +2192,9 @@ WCF.Date.Picker = { }); // format default date - $input.datepicker('setDate', new Date($inputValue)); + if ($inputValue) { + $input.datepicker('setDate', new Date($inputValue)); + } // bug workaround: setDate creates the widget but unfortunately doesn't hide it... $input.datepicker('widget').hide();