Fix datetimepicker so that it doesn't add trailing whitespaces.
authorPawel Solyga <Pawel.Solyga@gmail.com>
Sun, 22 Feb 2009 11:34:43 +0000
changeset 1462 8686c7223028
parent 1461 92c5a390739a
child 1463 d25793debbfb
Fix datetimepicker so that it doesn't add trailing whitespaces. Patch by: Pawel Solyga Reviewed by: to-be-reviewed
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());
 	}
 });