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

Web DevProductivity

Keeping on top of website updates

Learn what website updates are, what they entail, why they are important, and how we can help

Freelancing

Getting the most out of your agency

Here are some tips based on years of working with, for, and as an agency on how to get the most out of any work you do.