Bootstrap datetimepicker图标没有显示

时间:2017-09-18 16:24:47

标签: css twitter-bootstrap icons datetimepicker bootstrap-datetimepicker

我正在使用bootstrap 3.x.x.并添加了datetimepicker 4.17,datetimepicker工作正常,但没有显示时钟图标和箭头图标。

https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js

https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker.min.css

enter image description here

我尝试过自定义图标也很好。

icons: {
    time: 'glyphicon glyphicon-time',
    date: 'glyphicon glyphicon-calendar',
    up: 'glyphicon glyphicon-chevron-up',
    down: 'glyphicon glyphicon-chevron-down',
    //previous: 'glyphicon glyphicon-chevron-left',
    previous: 'glyphicon glyphicon-backward',
    next: 'glyphicon glyphicon-chevron-right',
    today: 'glyphicon glyphicon-screenshot',
    clear: 'glyphicon glyphicon-trash',
    close: 'glyphicon glyphicon-remove'
}

here

但默认图标未显示。 我错过了什么,请帮助!

提前致谢。

2 个答案:

答案 0 :(得分:3)

确保您还加载了glyphicon icon-font。 这可能就是图标没有出现的原因。

答案 1 :(得分:0)

在bootstrap 4中,我用字体图标替换了这些图标以使其起作用:

 $(".timepicker").datetimepicker({
            icons:
                {
                    up: 'fa fa-angle-up',
                    down: 'fa fa-angle-down'
                },
            format: 'LT'
        });
相关问题