fgelinas/timepicker — Issue #40: selectHours doesn't use the configured instance of timepicker
Author: lookfirst
Created: 2012-03-08 03:16:54+00:00
State: open

There is a line in selectHours which is causing me a lot of grief....

```$target = $(id)```

The primary issue is that is supposed to be a pointer to the instance of the timepicker that is configured on a jquery element. In other words, I do something like this:

```

```

```
$('#startDate', '#id1').timepicker()
$('#startDate', '#id2').timepicker()
```

Instead of timepicker internalizing which element has been configured as a timepicker, it just internalizes the selector. It then uses the ```$target = $(id)``` line in selectHours() to find the right element. Not only is this inefficient, but it also prevents my code above from working.

I'm not even sure how to fix this as I'm guessing the problem is rampant in the codebase... I see it in selectMinutes() and a few other methods.