Last post Feb 08, 2016 03:26 PM by bbcompent1
Feb 08, 2016 01:38 PM|Arpit Birla|LINK
I am developing HR module in asp.net(Web Form) . I am using DayPilotMonth calendar . I need to show different colors on different event on DayPilotMonth calendar for different types of leave for example red for sick leave , blue for emergency leave.
But I am unable to change colors on event of DayPilotMonth calendar.Please help.
Feb 08, 2016 03:26 PM|bbcompent1|LINK
The answer to your question was found rather quickly at daypilot's web site. Take a look:
I also wanted event-specific colors for multiple people's events. This is how I tackled adding this feature:
I added a DataColorField property so that I can define a color for each event along with the ID/Name/Start/End DataTable. Just one more column, which I selectwith a jointhe user table, where the user's color is stored, joined on the userID to which the event is assigned.
These are the DayPilot Lite files I edited:
•DayPilotCalendarProperties.cs - Added DataColorField accessor.
•DayPilotCalendar.cs - Added dataColorField property to class definition, Added color retrieval to viewstate code, Substituted Event.Color for the event's background-color attribute.
•Event.cs - Added Color property.
Then just rebuild your DLL and put it in your /bin.
It's not too tough, you can do it!
* Comment posted by Rich from IT 6 years ago.