Fix datetimepicker so that it doesn't add trailing whitespaces.
Patch by: Pawel Solyga
Reviewed by: to-be-reviewed
--- a/app/jquery/jquery-ui.datetimepicker.js Sun Feb 22 11:19:29 2009 +0000
+++ b/app/jquery/jquery-ui.datetimepicker.js Sun Feb 22 11:34:43 2009 +0000
@@ -1502,6 +1502,9 @@
}
var date = (day ? (typeof day == 'object' ? day : new Date(year, month, day, hour, minute)) :
new Date(this._currentYear, this._currentMonth, this._currentDay, this._currentHour, this._currentMinute));
+
+ if (this._get('pickDateOnly'))
+ return $.datetimepicker.formatDate(this._get('dateFormat'), date, this._getFormatConfig());
return $.datetimepicker.formatDate(this._get('dateFormat')+' '+this._get('timeFormat'), date, this._getFormatConfig());
}
});