i’M looking for a way of binding the cell background colors on the calendar control to the date represented by that cell. I imagine this might be useful for others using the calendar control i.e. downtime tracking, coloring by daily production values, historical alarm/event viewing.
was able to get a version of this to work using the month view component
steps:
set the month views Event display mode to ‘highlight’
you will need to drive the events table with your own query, my working one is as follows
SELECT [date] as startDate, [date] as endDate, 'blue' as color, 1 as description
FROM mytable
WHERE [date]>'{Root Container.Month View.monthStartDate}' AND
[date]<='{Root Container.Month View.monthEndDate}'
where monthStartDate and monthEndDate are dynamic (are we calling the custom now?) properties driven as follows
Month End
Nice find. I tried this way but I can’t change the color ; tried to change it to red or even a wrong color with no effect. Have you a way to go ? can you upload your windows ?
With what version of Ignition did you tried it ? I’m using 7.5…
Sorry my query can be a bit misleading. The color in the query is really just a placeholder. I don’t know what the component actually requires in terms of fields but I figured I may as well provide a table with the same number of columns and column names as what it expects.
SELECT [date] as startDate, [date] as endDate, 'blue' as color, 1 as description
FROM mytable
WHERE [date]>'{Root Container.Month View.monthStartDate}' AND
[date]<='{Root Container.Month View.monthEndDate}'
should really be
SELECT [date] as startDate, [date] as endDate, 'blah' as color, 'blah' as description
FROM mytable
WHERE [date]>'{Root Container.Month View.monthStartDate}' AND
[date]<='{Root Container.Month View.monthEndDate}'
The cell color is set by choosing the color for the “event highlight background” property
remember to set the month views event display mode to highlight