I am trying to include a time field that has a min and max allowed range, but that is prepopulated with a value from the database that might be incorrect (out of range). When it's incorrect, I show an error message to the user, so they can change it. I'm using keepInvalid and useCurrent so that the incorrect value doesn't get wiped out or changed, but the problem is that when they click to pop up the widget, none of the values are changeable. The time just says 12:00:00 and won't let you use the arrows to change it. Removing keepInvalid and useCurrent makes the time changeable again, but it also changes the incorrect value to the min value automatically.
Can anyone tell me what I am doing wrong?
<div class="formTimelineStartTime">
<div class="form-group control-group">
<div class="controls">
<div class="input-group date">
<input type="text" id="fldTBStartTime1" class="form-control input-sm" value="12:45:45 PM" readonly="readonly"/>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function () {
$('#fldTBStartTime1').datetimepicker({
useCurrent: false,
keepInvalid: true,
format: 'hh:mm:ss A',
minDate: '7/6/2016 12:08:38 PM',
maxDate: '7/6/2016 12:30:14 PM',
ignoreReadonly: true
});
});
</script>