The timepicker addon adds a timepicker to jQuery UI Datepicker, thus the datepicker (jQueryUI) is required for using any of these. In addition all datepicker options are still available through the timepicker addon.
Back to Blog
Download Timepicker Addon
Download Timepicker Addon Minified
There is a small bit of required CSS:
/* css for timepicker */ #ui-timepicker-div dl{ text-align: left; } #ui-timepicker-div dl dt{ height: 25px; } #ui-timepicker-div dl dd{ margin: -25px 0 10px 65px; }
Has this Timepicker Addon been helpful to you?
Add a simple timepicker to jQuery UI's datepicker
$('#example1').datetimepicker();
Show time in AM/PM 12 hour format
$('#example2').datetimepicker({ ampm: true });
Show only the time picker without date picker
$('#example3').timepicker();
Change the format (default is "hh:mm tt")
$('#example4').datetimepicker({ timeFormat: 'h-m' });
Show Seconds, Minutes, or Hours
$('#example5').datetimepicker({ showSecond: true, timeFormat: 'hh:mm:ss' });
Hours, Minutes, Seconds in steps
$('#example6').datetimepicker({ showSecond: true, timeFormat: 'hh:mm:ss', stepHour: 2, stepMinute: 10, stepSecond: 10 });
Default Hours, Minutes, Seconds
$('#example7').datetimepicker({ hour: 13, minute: 15 });
Version 0.5
Last updated on 6/16/2010
jQuery Timepicker Addon is currently available for use in all personal or commercial projects under both MIT and GPL licenses. This means that you can choose the license that best suits your project, and use it accordingly.
GPL License
MIT License