I'm using the bootstrap datepicker and suppose I wish to apply styles to the calendar that appear when the calendar opens:
- Highlight 3/1/17 3/7/17 red
- Highlight 3/9/17 3/17/17 blue
How can I use CSS to do this? Is there a feature in the API that allows for this?
There is no direct API for this feature, but you can use option
debug: true
to inspect component HTML.One way to target a specific day is using a CSS selector based on
data-day
attribute value, for example:[data-day="03/01/2017"]
. Here a full live example:Here you can find a similar example.