在弹出窗口中,bootstrap日历在firefox中运行,但不在chrome
中我的HTML如下:
<label for="text-input">Birth Date</label>
<div id="txtBirthDate" class=" input-group date dp-ex-4" data-date="12-02-2012" data-date-format="dd.mm.yyyy" data-date-autoclose="true" data-date-start-view="2">
<input class="form-control" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
任何人都可以帮忙吗?
答案 0 :(得分:2)
尝试将此样式添加到您的html页面
<style>
.datepicker {z索引:1151;}
答案 1 :(得分:0)
@ User3724793 您是否使用javascript进行BootStrap日历,如果没有请使用此..
$.extend($.fn.datepicker.defaults, {
parse: function (string) {
var matches;
if ((matches = string.match(/^(\d{2,2})\/(\d{2,2})\/(\d{4,4})$/))) {
return new Date(matches[3], matches[1] - 1, matches[2]);
} else {
return null;
}
},
format: function (date) {
var
month = (date.getMonth() + 1).toString(),
dom = date.getDate().toString();
if (month.length === 1) {
month = "0" + month;
}
if (dom.length === 1) {
dom = "0" + dom;
}
return month + "/" + dom + "/" + date.getFullYear();
}
});
</script>