trentrichardson / jQuery-Timepicker-Addon

Adds a timepicker to jQueryUI Datepicker
http://trentrichardson.com/examples/timepicker/
MIT License
2.66k stars 1.05k forks source link

Parse fails with altField #764

Closed glittle closed 9 years ago

glittle commented 9 years ago

When I have an altField showing just time (default setting), then a Wrong time format log is shown in the console. It appears that this line (line 310):

var currDT = (this.$altInput && this._defaults.altFieldTimeOnly) ? this.$input.val() + ' ' + this.$altInput.val() : this.$input.val();

results in currDT being a single space, even though it is empty. Later code (line 1927) finds that there are two (empty) parts to the split string. This would be avoided if currDT was trimmed.

trentrichardson commented 9 years ago

You're saying trim on line 310 fixes the issue?

glittle commented 9 years ago

Yes, it helps with that particular issue.

Glen Little Calgary, AB email: glen.little@gmail.com cell: 403-402-7106 "Strive to perceive the nobility in every human being"

On Tue, Sep 30, 2014 at 9:04 AM, Trent Richardson notifications@github.com wrote:

You're saying trim on line 310 fixes the issue?

— Reply to this email directly or view it on GitHub https://github.com/trentrichardson/jQuery-Timepicker-Addon/issues/764#issuecomment-57328069 .