Marking the selected day in month view

Hi All,

I want to change the background colour of the selected day in the onEmptyClick event, but cannot seem to be able to get it working.

my current code is:

        scheduler.attachEvent("onEmptyClick", function (x_ind, y_ind, x_val, y_val, e) {
            var day = x_ind.getDate();
            var month = x_ind.getMonth();
            var year = x_ind.getFullYear();
            var oldDate = new Date($('#selectedDate').val());
            var newDate = new Date(year, month, day);

                days: oldDate

                days: newDate,
                zones: "fullday",       // marks the entire day
                type: "dhx_time_block",
                css: "selected"   // the applied css style


selectedDate is a hidden field I use to store the selected date.

Am I doing something wrong or is this not supported in the way I want to use it?



I couldn’t reproduce the issue with your code

I think you need to use getActionData() method to get the target date

Use this sample as an example. It demonstrates almost the same, but onMouseMove event is used instead of onEmptyClick.