Skip to content

Commit

Permalink
Fix selection of the last item.
Browse files Browse the repository at this point in the history
  • Loading branch information
Anders committed Jun 21, 2009
1 parent 116e85e commit 55a3586
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions jquery.timePicker.js
Expand Up @@ -84,8 +84,7 @@
var min = (time.getHours() * 60 + time.getMinutes()) - startMin;
var steps = Math.round(min / settings.step);
var roundTime = normaliseTime(new Date(2001, 0, 0, 0, (steps * settings.step + (startMin)), 0));
roundTime = (startTime < roundTime && roundTime < endTime) ? roundTime : startTime;

roundTime = (startTime < roundTime && roundTime <= endTime) ? roundTime : startTime;
var $matchedTime = $("li:contains(" + formatTime(roundTime, settings) + ")", $tpDiv);

if ($matchedTime.length) {
Expand Down

0 comments on commit 55a3586

Please sign in to comment.