Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge pull request #41 from rokerkony/bug-timeInput-focus
Browse files Browse the repository at this point in the history
#40 timeInput shows autocomplete on focus even if value is not from predefined values
  • Loading branch information
abtris committed Sep 30, 2013
2 parents 2f3e23b + c991ac8 commit 3f74443
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/modules/ui/timeInput/timeInput.js
@@ -1,4 +1,4 @@
(function(angular) {
(function(angular, $) {
'use strict';

var module = angular.module('ngx.ui.timeInput', []);
Expand Down Expand Up @@ -37,8 +37,8 @@
});
}
}).focus(function() {
element.autocomplete('search', element.val());
});
element.autocomplete('search', ($.inArray(element.val(), values) === -1) ? '' : element.val());
});

ctrl.$parsers.push(function(value) {
ctrl.hours = undefined;
Expand Down Expand Up @@ -67,4 +67,4 @@
};
}]);

})(window.angular);
})(window.angular, window.jQuery);

0 comments on commit 3f74443

Please sign in to comment.