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
6 months 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]
6 months ago.

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

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

New Reply
This reply is
Your name (optional):