1

I am using bootstrap 3.x.x. and added datetimepicker 4.17 , datetimepicker is working fine but not showing the clock icon and nor the arrow icons.

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

i tried custom icons that worked also fine.

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

But default icons are not showing up. what i am missing please help!

Thanks in advance.

Malik Rizwan
  • 759
  • 1
  • 10
  • 31

2 Answers2

3

Make sure you also load the glyphicon icon-font. That might be the reason why the icons aren't showing up.

Dailyrox
  • 427
  • 2
  • 4
  • 14
  • when i do change the bootstrap version it works. that means there no issue with glyphicons. thanks – Malik Rizwan Dec 13 '17 at 03:29
  • 1
    Not all versions of Bootstrap embed Glyphicon if I recall correctly. Try to link Glyphicon through a CDN and see if it fixes the problem. – Dailyrox Dec 13 '17 at 06:44
1

In bootstrap 4 I replaced those icons with font icons to make it work:

 $(".timepicker").datetimepicker({
            icons:
                {
                    up: 'fa fa-angle-up',
                    down: 'fa fa-angle-down'
                },
            format: 'LT'
        });
Manohar Khadka
  • 2,186
  • 2
  • 18
  • 30