Skip to content

Commit

Permalink
Merge pull request jonthornton#593 from pstephane/patch-5
Browse files Browse the repository at this point in the history
Cleaning timepicker input does not trigger changeTime
  • Loading branch information
jonthornton authored Mar 2, 2017
2 parents 8088237 + 70b214a commit 93afeb1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion jquery.timepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -770,12 +770,17 @@

function _formatValue(e, origin)
{
if (this.value === '' || origin == 'timepicker') {
if (origin == 'timepicker') {
return;
}

var self = $(this);

if (this.value === '') {
_setTimeValue(self, null, origin);
return;
}

if (self.is(':focus') && (!e || e.type != 'change')) {
return;
}
Expand Down

0 comments on commit 93afeb1

Please sign in to comment.