jQuery UI library has many widgets for specific purposes like – Accordion, Tabs, Tooltip, etc. one of them is Datepicker which allows the users to pick a date from the Widget.
It has various options to manage the Datepicker layout e.g. change the default date format, restricting date range, show year dropdown, etc.
While using this Widget you may have a condition arises where you want to highlight some of the specific dates or change the background-color of Holidays, events Days.
You can do this with beforeShowDay
option in the datepicker() method. This allows you to specify a CSS class that contains your defined CSS style.