Skip to main content

mark

Optional. Adds a CSS class to specific days

mark?: (date: Date) => string;

Parameters:

The function receives one parameter:

  • date: Date - a date object

and must return a string with the name of the CSS class or an empty string.

Example

<style>
.highlight-date {
color: #fff;
}
</style>

const calendar = new dhx.Calendar("calendar_container", {
mark: function(date) {
if (date.getDay() === 6) {
return "highlight-date";
}
},
css: "dhx_widget--bordered"
});