Hi,
Kindly let me know how to set background color for a full day (not any particular event) dynamically by passing color code.
Hi,
You should use addMarkedTimespan to set background color for a full day
docs.dhtmlx.com/scheduler/api__ … espan.html
Hi,
We have used addMarkedTimespan but i would like to set the css background-color feature dynamically instead of hard coding a color there.
for example in the demo it is given as below
.red_section {
background-color: red;
opacity: 0.25;
filter:alpha(opacity=25);
}
I would like to know if you could dynamically pass the color code based on certain conditions instead of hard coding it as red.
Thanks
Hi,
You can change color dinamically also using addMarkedTimespan.
Call deleteMarkedTimespan() when onBeforeViewChange fires, change settings in onViewChange and update view to apply changes.
Please check the example:
docs.dhtmlx.com/scheduler/snippet/1ff639ce
Hi,
.yellow_section {
background-color: #ffa749;
opacity: 0.25;
filter:alpha(opacity=25);
}
in the above section can i make color code as dynamic . That is will i be able to pass the color code selected by the end user as shown below.What ever be the color code i need to set it accordingly.
.variable_colorsection {
background-color: {colorCode};
opacity: 0.25;
filter:alpha(opacity=25);
}
Unfortunately no. To update color, you need each time delete existing timespan and create new one.
You can create the required numbers of CSS classes with different background-color, allow the user to choose a color and according to his choice, add new Timespan with appropriate css settings.