mark

adds a CSS class to specific days

function mark;

Example

<style>
    .highlight-date {
        color: #fff;
    }
</style>
 
var calendar = new dhx.Calendar("calendar", {
    mark: function(date) {
        if (date.getDay() === 6) {
            return "highlight-date";
        }
    },
    css: "dhx_widget--bordered"
});

Related samples

Details

The function passed to the method receives one parameter:

  • date (Date) - a date object

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

See also
Back to top