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
This commit is contained in:
rvelices
2014-05-31 18:48:11 +00:00
parent 4a99fcdf89
commit bd73ad9679
+1 -1
View File
@@ -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) {