Skip to content

Commit b394ee8

Browse files
Added separator to formatted time output
1 parent b4805d6 commit b394ee8

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

jquery-ui-timepicker-addon.js

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* jQuery timepicker addon
33
* By: Trent Richardson [http://trentrichardson.com]
44
* Version 0.9.2-dev
5-
* Last Modified: 12/13/2010 by Charles Phillips
5+
* Last Modified: 12/17/2010
66
*
77
* Copyright 2010 Trent Richardson
88
* Dual licensed under the MIT and GPL licenses.
@@ -58,10 +58,8 @@ function Timepicker() {
5858
hourMax: 23,
5959
minuteMax: 59,
6060
secondMax: 59,
61-
6261
minDateTime: null,
63-
maxDateTime: null,
64-
62+
maxDateTime: null,
6563
hourGrid: 0,
6664
minuteGrid: 0,
6765
secondGrid: 0,
@@ -185,7 +183,7 @@ $.extend(Timepicker.prototype, {
185183
// the time should come after x number of characters and a space.
186184
// x = at least the length of text specified by the date format
187185
var dp_dateFormat = $.datepicker._get(this.inst, 'dateFormat');
188-
regstr = '.{' + dp_dateFormat.length + ',}\\s*?' + regstr;
186+
regstr = '.{' + dp_dateFormat.length + ',}\\s*' + regstr;
189187
}
190188

191189
treg = timeString.match(new RegExp(regstr, 'i'));
@@ -598,7 +596,6 @@ $.extend(Timepicker.prototype, {
598596
if (dp_inst.lastVal !== undefined && (dp_inst.lastVal.length > 0 && this.$input.val().length === 0))
599597
return;
600598

601-
<<<<<<< HEAD
602599
if (this._defaults.timeOnly === true) {
603600
formattedDateTime = this.formattedTime;
604601
if (this.$altInput) {
@@ -607,18 +604,12 @@ $.extend(Timepicker.prototype, {
607604
} else if (this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) {
608605
if (this.$altInput) {
609606
if (this._defaults.timeOnly !== true) {
610-
this.$altInput.val(this.$altInput.val() + ' ' + this.formattedTime);
607+
this.$altInput.val(this.$altInput.val() + this._defaults.separator + this.formattedTime);
611608
} else {
612609
this.$altInput.val(this.formattedDateTime);
613610
}
614611
}
615-
formattedDateTime += ' ' + this.formattedTime;
616-
=======
617-
if (this._defaults.timeOnly === true) formattedDateTime = this.formattedTime;
618-
else if (this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) {
619-
if (this.$altInput) this.$altInput.val(this.formattedTime);
620-
else formattedDateTime += this._defaults.separator + this.formattedTime;
621-
>>>>>>> michael-simons-master
612+
formattedDateTime += this._defaults.separator + this.formattedTime;
622613
}
623614

624615
this.formattedDateTime = formattedDateTime;

0 commit comments

Comments
 (0)