Eonasdan/bootstrap-datetimepicker箭头图标未在Safari上显示,而在Chrome上显示蓝色方块 [英] Eonasdan/bootstrap-datetimepicker arrow icon not showing on Safari and showing blue squares on Chrome

查看:187
本文介绍了Eonasdan/bootstrap-datetimepicker箭头图标未在Safari上显示,而在Chrome上显示蓝色方块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的日期时间选择器工作正常,但是浏览时间和日期的箭头显示不正确.

My Datetime picker is working fine but the arrow to navigate through time and day are not showing properly.

Safari

Chrome

我尝试使用以下代码在Javascript中设置默认选项:

I've tried to set back the default option in Javascript using the following code :

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

但是似乎没有任何作用.

But nothing seems to be working.

推荐答案

如果您使用的是Bootstrap V4,则删除了Glyphicons.我通过使用Fontawesome修复了丢失的箭头.将它们添加到图标选项.

If you're using Bootstrap V4, Glyphicons have been been removed. I fixed the missing arrow by using Fontawesome. Add these to the icons option.

    $('.dateP').datetimepicker(
    {

        icons: 
        {
            next: 'fa fa-angle-right',
            previous: 'fa fa-angle-left'
        },
        format: 'DD/MM/YYYY',

        widgetPositioning: {
            horizontal: 'right',
            vertical: 'auto'
        }
    });

这篇关于Eonasdan/bootstrap-datetimepicker箭头图标未在Safari上显示,而在Chrome上显示蓝色方块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆