Fork me on GitHub

JQUERY.SELECTTIME.JS by Tony Landis


jQuery plugin to take a normal input field containing 24 hour formatted time (HH:MM:SS), and create options for the selection of hour, minute, AM/PM, updating the user's selection back to 24 hour format in the input field.

Example # 1 - leaves the 24-hour input field visible.


Example # 2 - hides the 24-hour input field. (This is the default setting)

code for the jquery.selecttime.js examples above

<script type="text/javascript" src="/jquery/1.2.6/jquery.min.js"></script>
<script type="text/javascript" src="/selecttime/jquery.selecttime.js"></script>
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('#time1').selecttime({increment:10, hide:false});
		$('#time2').selecttime({increment:15});
	});
</script>
<input type="text" id="time1" value="10:40:00" disabled="true" />
<input type="text" id="time2" value="18:15:00" />

Authors

Tony Landis (www.tonylandis.com)

Download

You can download this project in either zip or tar formats.

You can also clone the project with Git by running:

$ git clone git://github.com/tony-landis/jquery-plugins