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

Highlight holidays

Asked by Chris
5 years ago.

How do I highlight holiday dates that i have in an array ?

I see the example for angular, but how would I do this for javascript?

Thank you

Answer posted by Chris
5 years ago.

I figured it out...

dp.onBeforeCellRender = function(args) {
   var cellDate = moment(args.cell.start.value).format("YYYY-MM-DD");
				
   if (jQuery.inArray(cellDate, holidayArr) !== -1) {
      args.cell.backColor = "#FF0000";
   }
};
Comment posted by Dan Letecky [DayPilot]
5 years ago.

Thanks for posting the solution, Chris!

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