jQuery UI Widgets › Forums › Scheduler › Specifying the default colour for a calendar
Tagged: default appointment color, javascript scheduler, jquery scheduler, jqwidgets scheduler, scheduler
This topic contains 9 replies, has 4 voices, and was last updated by Lucky_1110 5 years, 7 months ago.
-
Author
-
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.
Alex.
Hello Alex,
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.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHi,
I was wondering if there is a solution for this? I have the exact same problem.
Best regards,
Chris AndriesHello 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:
https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxscheduler/jquery-scheduler-styling-and-appearance.htm?search=scheduler
Also, you could use the Theme Builder to create your own theme:
https://jqwidgets.com/themebuilder/Best Regards,
Hristo HristovjQWidgets team
https://www.jqwidgets.comHi,
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. ‘Hello Chris Andries,
You could define the
Rooms
by default.
It is not necessarily to be generated with the initial values.
Please, take a look at this example: http://jsfiddle.net/txhi/6349exrq/
I hope this will help.Best Regards,
Hristo HristovjQWidgets team
https://www.jqwidgets.comhii Hristo,
wanted to clarify.. can’t we use other colors for rooms in legend instead of using defined pattern in schemas?
Any update?
Hello Lucky_1110,
Yes, you could choose between 27 schemes (from ‘scheme01’ to ‘scheme27’) which you could set in the
colorScheme
member of theresources
property.
Also, for the jqxScheduler how to look, you could use thetheme
property 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.Best Regards,
Hristo HristovjQWidgets team
https://www.jqwidgets.comBut I want to use specific set of color for each room which is not available, in 27 schemes..
Any other suggestion? -
AuthorPosts
You must be logged in to reply to this topic.