A jQuery timepicker plugin
Code: $("#clockpick1").clockpick();
Click on the clock -- "other field" example, with callback
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
Download jquery.clockpick.js (11K)
Download jquery.clockpick.packed.js (4K)
Download clockpick.css (1K)
Also you will of course need the jQuery library, if you don't already have it:
http://jquery.com
Basic |
After including the jQuery script in your html <head> block, include the jquery.clockpick.js file like so: Then in your $(document).ready block, simply add the following bit of code: $("#clockpick").clockpick(); This assumes you are binding the plugin to an element with the id called "clockpick". You can certainly bind the plugin to any element that makes sense for your use. |
Adding parameters |
ClockPick takes two optional parameters: Example: $("#clockpick").clockpick({ |
Click target different |
If you want to have the action on a different element than the time field, you would configure as below (like the "click on clock" demo). Assuming the field you wish to have filled with the time, has an id of "myfieldid": $(".clockpick").clockpick({ |