Reputation: 103
In the code below, StartTime
is 05/29/2017 1:00:00 PM
.
But I want StartTime
to be 1:00:00 PM
.
HTML
<div class="form-group">
<label>From</label>
<input class="form-control " id="StartTime" type="text" name="StartTime"/>
</div>
JS
$('#StartTime').datetimepicker({
format: 'LT'
});
Upvotes: 0
Views: 3364
Reputation: 1306
this is how you can disable date
$(function () {
$('#StartTime').datetimepicker({
format: 'LT',
});
});
Upvotes: 1
Reputation: 176
try this:
$("#StartTime").datetimepicker({
format: 'hh:ii',
startView: 1,
pickDate: false,
autoclose: true
}).on("show", function(){
$(".table-condensed .prev").css('visibility', 'hidden');
$(".table-condensed .switch").text("Pick Time");
$(".table-condensed .next").css('visibility', 'hidden');
});
Upvotes: 0