Vote count:
0
<div class="col-md-5 no-padding">
<div class="input-group date form_datetime_from col-md-12" id="leavefromdate" data-date="2015-01-01 05:25" data-link-field="leavefrom">
<input class="form-control" type="text" value="" readonly>
<span class="input-group-addon success"><span class="glyphicon glyphicon-th"></span></span>
</div>
<input type="hidden" id="leavefrom" name="ApplyLeave[leavefrom]" value="" /><br/>
</div>
<span class="col-md-2 no-padding" style="float:left;line-height:35px;text-align:center">To</span>
<div class="col-md-5 no-padding">
<div class="input-group date form_datetime_to col-md-12" id="leavetodate" data-date="" data-date-format="yyyy-mm-dd H:i" data-link-field="leaveto">
<input class="form-control" type="text" value="" readonly>
<span class="input-group-addon success"><span class="glyphicon glyphicon-th"></span></span>
</div>
<input type="hidden" id="leaveto" name="ApplyLeave[leaveto]" value="" /><br/>
</div>
im using this datetimepicker http://ift.tt/TgBoni
my jquery code id
$(".form_datetime_from").datetimepicker({
format: 'yyyy-mm-dd hh:ii',
autoclose: true,
//linkField: "leaveto",
}).on('changeDate', function(ev){
$("#leaveto").val($("#leavefrom").val());
$("#leavetodate").attr('data-date',$("#leavefrom").val());
});
//date picker 2
$(".form_datetime_to").datetimepicker({
//setStartDate: '2012-01-01',
format: 'yyyy-mm-dd hh:ii',
autoclose: true,
startDate: "leavefrom",
});
i want to set the min date for the second datetimepicker is the first datetimepicker value. also user can select the date only in the first datetimepicker , not able to choose before and after dates
asked 1 min ago
second Datetimepicker choose only date choosen by first datetimepicker
Aucun commentaire:
Enregistrer un commentaire