Time validation is not working properly
But When i entered 9:59 AM PickUp Time and Drop Time 11:15AM then its not validating properly. As i validate drop time should be greater, But i already select greater time 11:15AM
$(function () {
$('#pickTime').datetimepicker({
ignoreReadonly: true,
format: 'LT'
});
});
$(function () {
$('#drpTime').datetimepicker({
ignoreReadonly: true,
format: 'LT'
});
});
{
isValid = false;
$('#drpTime').after('<div class="error">Drop time should be greater than pickup time</div>');
}
HTML:-
<div class="row"><div class="col-md-12">
<div class="col-md-4">
<div class="form-group">
<label for="traveller-name"><b>
Time <span class="ast">
*</span></b></label>
</div>
</div>
<div class="col-md-4" id="divpickTime">
<div class="form-group">
<input type="text" id="pickTime" readonly="readonly" class="form-control"/>
</div>
</div>
<div class="col-md-4" id="divdrpTime">
<input type="text" id="drpTime" readonly="readonly" class="form-control input-small"/>
</div>
</div>
</div>
Shiv Sharma