Complete list of custom icon properties for Bootstrap 3 Datepicker

Complete list of custom icon properties for Bootstrap 3 Datepicker

If you are using Bootstrap 3 Datepicker and want to change the icons used for the symbols within the datepicker then you can.

On initialisation you can add an icons property and specify each icon you want.

You knew this because like a good developer you read the documentation.

What the documentation doesn’t tell you is the names you need to use for them all.

Through trial and error (and looking at the source code) I was able to grab them all.

  $('.my-date-picker').datetimepicker({
    icons: {
      time: "fa fa-clock-o",
      date: "fa fa-calendar",
      up: "fa fa-caret-up",
      down: "fa fa-caret-down",
      previous: "fa fa-caret-left",
      next: "fa fa-caret-right",
      today: "fa fa-today",
      clear: "fa fa-clear",
      close: "fa fa-close"
    }
  });

I hope this saves someone the 30 minute search I had to go on!

Recent posts View all

EmailStudents

Unsolicited Hiring Tips

If you're going to email a company out of the blue, help them to help you with these three tips

Reviews

Review: How data happened

A fun read for anyone interested in data or the social history around it