Hello team,
I'm trying to add/remove custom class to header cell on click but without luck. Could you please point me if some similar functionality as 'cls' property in rows exist for header? Thanks
need to do something like that
Screenshot 2022-05-16 at 17.17.57.png (498.98 KiB) Viewed 462 times
Since we don't support this, I'm afraid it's something you have to implement. If you would like this to be supported in the core, we are open for a feature sponsorship. Please reach out to sales[at]bryntum for a quote if interested.
If I to make sure the 1st of June 2022 header (just for example) always will contain class 'foo' now this is always changing back (like in resize, change date ect..).
thought about listening to some event and make sure its there. but what event should I listen to?
Please check this code example. headerConfig has headerCellCls. startDate and endDate helps you to identify the tick.
viewPreset : {
base : 'hourAndDay',
id : 'myHourAndDayPreset',
headers : [
{
unit : "hour",
increment : 12,
renderer : (startDate, endDate, headerConfig, cellIdx) => {
headerConfig.headerCellCls = "myClass"; // will be added as a CSS class of the header cell DOM element
return DateHelper.format(startDate, 'YYYY-MM-DD');
}
}
]
}