First of all I have to say – jqWidgets is an awesome set of components and I am a happily paid up subscriber. I have recently however come across a use case which I wanted to run past the community.
In this example assume I have three calendars Room1, Room2 and Room3.
Having discussed the issue with Hristo (who has been very helpful), it is not possible to specify a default colour for a calendar. You can set the colour for appointments, but this can end up with the appointments for a calendar having a different colour to the calendar colour in the Legend bar. You cannot control the color of the Legend entry for a calendar.
This means you need to rely on one of the 26 inbuilt default calendar colour schemes. In this example I’ll use scheme05. Under scheme05 the first calendar to load has default colour blue, the second dark green and the third light green. If there are no appointments for a calendar in the current view then it does not load the calendar. So say I’m in a week view where there are appointments for Room2 and Room3 but not for Room1. Room 2 will now get default colour blue and Room3 dark green. Calendar colours can therefore change as you move from week to week. You can work around this (if you know the set of all possible calendars) by loading a dummy appointment for each calendar with zero duration before you load the real appointments. If you always load the dummy appointments in the same order, the the calendars will be assigned the same default colour each time.
But why is it so important for me to be able to specify the default colour for a calendar rather than use the defaults from one of the 26 avaiable colour schemes? Colour is a powerful visual prompt. My customer has an existing system in which each calendar has a specific colour, and they’ve got used to recognising these colours and associate them strongly with each calendar. We’re replacing that system but they want to maintain the exact same colour associations.
I imagine this type of requirement can crop up quite often and wanted to check with the community if anyone else would appreciate a feature to specify a default calendar colour.
Thank you for the interest and for your assistance about this hint about “dummy appointments” it could be useful for others from the community.
We will discuss this scenario.
I was wondering if there is a solution for this? I have the exact same problem.
Hello Chris Andries,
Could you clarify your issue?
In the case where you want to have custom styling, you could use the jqxScheduler’s classes.
Please, take a look at this page:
Also, you could use the Theme Builder to create your own theme:
It’s about defining a color for a calendar and the legend to be the same. As in the first post of this thread axplained, colors are changing according to the view of the calendar.
Quote: ‘Under scheme05 the first calendar to load has default colour blue, the second dark green and the third light green. If there are no appointments for a calendar in the current view then it does not load the calendar. So say I’m in a week view where there are appointments for Room2 and Room3 but not for Room1. Room 2 will now get default colour blue and Room3 dark green. Calendar colours can therefore change as you move from week to week. ‘
wanted to clarify.. can’t we use other colors for rooms in legend instead of using defined pattern in schemas?
Yes, you could choose between 27 schemes (from ‘scheme01’ to ‘scheme27’) which you could set in the
colorSchememember of the
Also, for the jqxScheduler how to look, you could use the
themeproperty to change its look.
Which you could manipulate and transform on the desired way.
We provide “Theme Builder” tool for this purpose.
With it, you could change the provided themes.
But I want to use specific set of color for each room which is not available, in 27 schemes..
Any other suggestion?
You must be logged in to reply to this topic.