Сообщение от Viper
|
Если инпутов несколько,
|
нет проблем ...
<!DOCTYPE HTML>
<html>
<head>
<base href="http://trentrichardson.com/examples/timepicker/" />
<title>Untitled</title>
<meta charset="utf-8">
<link rel="stylesheet" media="all" type="text/css" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<link rel="stylesheet" media="all" type="text/css" href="jquery-ui-timepicker-addon.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
<script type="text/javascript" src="jquery-ui-timepicker-addon.js"></script>
<script type="text/javascript" src="jquery-ui-sliderAccess.js"></script>
<script>
$(function () {
$('.hasDatetime').each(function (i, el) {
$(el).timepicker({
timeFormat: $(el).data('format')
})
})
})
</script>
</head>
<body>
<input class="span6 hasDatetime" type="text" data-format="HH:mm:ss" aria-required="true" required="" value="01:44:00" name="form[length]">
<input class="span6 hasDatetime" type="text" data-format="HH:mm" aria-required="true" required="" value="01:44:00" name="form[length]">
<input class="span6 hasDatetime" type="text" data-format="HH" aria-required="true" required="" value="01:44:00" name="form[length]">
</body>
</html>