In the previous sections, we have created a CSS rule and a JS function to apply a background color to an HTML element. The JS function needs to be executed by a JS function call when either date selection or event selection AJAX events get fired. We need to pass the currently selected date as an argument for the date selection JS function and the start date and end date as arguments for the event selection JS function.
In this case (a plain JSF application approach), we will generally store the listener arguments in hidden input variables and update those values on the AJAX update. Then we will create JS functions to retrieve the date arguments from DOM and apply the background color for the schedule date cells. These JS functions need to be executed from the oncomplete
JS callbacks of the AJAX requests. This is the first approach for applying date and event background colors to a schedule...