I am using this datetime collector for Bootstrap 4 https://tempusdominus.imtqy.com/bootstrap-4/
The plugin works just fine if the input is empty at boot time. However, I have an Edit form that already has a value, but datepicker deletes the value when the page loads.
<div class="container">
<div class="row">
<div class='col-sm-6'>
<div class="form-group">
<input class="form-control datetimepicker-input" data-target="#Entry_EntryDate" data-toggle="datetimepicker" data-val="true" data-val-date="The field Event Date must be a date." data-val-required="The Event Date field is required." id="Entry_EntryDate" type="datetime" value="2017-10-25 10:17 AM" />
</div>
</div>
</div>
</div>
and default js
$(function() {
$('#Entry_EntryDate').datetimepicker();
});
Here is the JsFiddle
I developed the recommended jsfiddle, so I am sure that I have all the necessary necessary dependencies.
I tried changing the locales by changing the formats, but no luck.
source
share