From bd73ad9679430a1bc27beb78b24a1d64ab0509ec Mon Sep 17 00:00:00 2001 From: rvelices Date: Sat, 31 May 2014 18:48:11 +0000 Subject: time picker more forgiving with parsing errors (accept dates only without time) git-svn-id: http://piwigo.org/svn/trunk@28578 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/themes/default/js/datepicker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'admin/themes/default/js') diff --git a/admin/themes/default/js/datepicker.js b/admin/themes/default/js/datepicker.js index eb6f31a6f..2a421c967 100644 --- a/admin/themes/default/js/datepicker.js +++ b/admin/themes/default/js/datepicker.js @@ -77,7 +77,7 @@ jQuery.fn.pwgDatepicker = function(options) { // set value from linked input if (linked) { - if (value[0].length == 10 && !options.showTimepicker) { + if (value[0].length == 10 && (!options.showTimepicker || value.length==1)) { set(jQuery.datepicker.parseDate('yy-mm-dd', value[0]), true); } else if (value.length == 2 && options.showTimepicker) { -- cgit v1.2.3