diff --git a/Proto.TimePicker.js b/Proto.TimePicker.js index 1bca2e7..1715e6a 100644 --- a/Proto.TimePicker.js +++ b/Proto.TimePicker.js @@ -136,6 +136,7 @@ // Hide timepicker on blur elm.on('blur', function() { if (!tpOver) { + elm.value = '00:00'; $tpDiv.hide(); } }); @@ -167,7 +168,7 @@ // Loop to next item. $selected.removeClassName(selectedClass); prev = $tpList.down("li:last").addClassName(selectedClass)[0]; - $tpDiv.scrollTop = prev.positionedOffset().top - prev.getHeight; + $tpDiv.scrollTop = prev.positionedOffset().top - prev.getHeight(); } e.stop(); return false; @@ -180,7 +181,7 @@ if (next) { next.addClassName(selectedClass); $selected.removeClassName(selectedClass); - if (next.positionedOffset().top + next.getHeight() > top + $tpDiv.getHeight) { + if (next.positionedOffset().top + next.getHeight() > top + $tpDiv.getHeight()) { $tpDiv.scrollTop = top + next.getHeight(); } }