search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

can't set color in cell when getDayOfWeek() == 7

Asked by Anonymous
7 years ago.

dp.onBeforeCellRender = function(args) {
if (args.cell.start.getDayOfWeek() == 7) { // does not work but == 6 or 5 or 4... it work
args.cell.backColor = "#EDED9F";
}
};

Answer posted by Dan Letecky [DayPilot]
7 years ago.

DayPilot.Date.getDayOfWeek() returns 0 for Sunday, 1 for Monday ... 6 for Saturday:

https://api.daypilot.org/daypilot-date-getdayofweek/

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.