简体   繁体   中英

Default date (today) bootstrap datepicker IE

Out of the box datepicker highlights the correct default date (today) in Chrome. However, in IE 11 it incorrectly picks the date 03/12/2015 (way off in the future).

I am using the following code

$('.datepicker').datetimepicker({
        format: 'DD/MM/YYYY'
});

<div class="input-group date datepicker">
    <span class="input-group-addon">
          <span class="glyphicon glyphicon-calendar"></span>
    </span>
    @Html.TextBoxFor(model => model.DateOfBirth, new { @class = "form-control" }
</div>

Any ideas to combat this?

Try add: userCurrent: false

Full Code:

$('.datetimepicker').datetimepicker({
    language: 'nl',
    useSeconds: false,
    useCurrent: false,
    showToday: true
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM