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 Dev

Updating payment method email addresses in Stripe

You can't update the email address associated with a payment method in Stripe via their dashboard, you need to use the Stripe CLI

Ruby

Irreversible Rails Migrations

What are irreversible migrations and how might we use them to our advantage?