From 645231ef2d4033f7943d49825c503494e8e2c738 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 31 Jan 2013 23:20:02 +0100 Subject: [PATCH] date picker no longer sets a value if empty --- wcfsetup/install/files/js/WCF.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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(); -- 2.20.1