Eonasdan/bootstrap-datetimepicker arrow icon not showing on Safari and showing blue squares on Chrome

后端 未结 3 2094
攒了一身酷
攒了一身酷 2021-01-15 22:09

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

Safari

Chrome

I\'ve tried to set back th

相关标签:
3条回答
  • 2021-01-15 22:33

    maybe there's no glyphicon in your boostrap or something wrong with it so that nothing happend, first workaround is: implement fontAwesome then set:

    $('.yourSelector').datetimepicker({         
         fontAwesome:'font-awesome'     
    });
    

    second workaround: open boostrap-datetimepicker.js then replace

     headTemplateV3:   '<thead>' +
                          '<tr>' +
                          '<th class="prev"><i class="icon icon-arrow-left"></i> </th>' +
                          '<th colspan="5" class="switch"></th>' +
                          '<th class="next"><i class="icon icon-arrow-right"></i> </th>' +
                          '</tr>' +
        '</thead>',
    

    width

    headTemplateV3:   '<thead>'+
                        '<tr>'+
                            '<th class="prev"><i class="glyphicon glyphicon-arrow-left"/></th>'+
                            '<th colspan="5" class="switch"></th>'+
                            '<th class="next"><i class="glyphicon glyphicon-arrow-right"/></th>'+
                        '</tr>'+
                    '</thead>',
    

    good luck!

    0 讨论(0)
  • 2021-01-15 22:39

    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'
            }
        });
    
    0 讨论(0)
  • 2021-01-15 22:51
       $('.dateP').datetimepicker(
        {
    
            icons: 
            {
                up: 'fa fa-angle-right',
                down: 'fa fa-angle-left'
            }
      });
    

    In this way you can use your custom icons as glyphicons have been deprecated!

    0 讨论(0)
提交回复
热议问题