# HG changeset patch # User Pawel Solyga # Date 1235302483 0 # Node ID 8686c722302837b3c71142f8216d2160687ae7e6 # Parent 92c5a390739a2e4abed06328181aa6c1ccd2e339 Fix datetimepicker so that it doesn't add trailing whitespaces. Patch by: Pawel Solyga Reviewed by: to-be-reviewed diff -r 92c5a390739a -r 8686c7223028 app/jquery/jquery-ui.datetimepicker.js --- 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()); } });