Malik Rizwan
Malik Rizwan

Reputation: 787

Bootstrap datetimepicker icons not showing

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.

Upvotes: 1

Views: 5200

Answers (2)

Manohar Khadka
Manohar Khadka

Reputation: 2195

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'
        });

Upvotes: 1

Dailyrox
Dailyrox

Reputation: 437

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

Upvotes: 3

Related Questions