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

addClass for cell?

Asked by Seb
6 years ago.

Hi
is there anything like cell.addClass('cssClass')?
I want to add one or more classes to cell but all I found is args.cell.cssClass = "cssClass", so if I want to add another class I have to check if cssClass is not empty in order to add a trailing space or not.

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

You can use DayPilot.Util.addClassToString() helper method:

args.cell.cssClass = DayPilot.Util.addClassToString(args.cell.cssClass, "my-class");

This will handle the spaces and also check if "my-class" is already added.

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