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

addClass for cell?

Asked by Seb
5 months 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]
5 months 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.

New Reply
This reply is
Your name (optional):