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

Ruby

Forcing a Rails database column to be not null

How you can force a table column to always have something in it with Rails

Writing Marketing

We've deleted an article's worth of unhelpful words

We've improved several pages across our site by removing words that add no value, and often detract from the article.