Our powerful JS Calendar component


Post by kobylin »

Hi!

We are testing your Calendar and trying to understand if it fits to our needs.
We want one customization which I cannot make using your documentation.

Here is what we need:
I want to customize datePicker in sidebar of calendar (make my own color, add some text there like described here https://bryntum.com/docs/calendar/api/Core/widget/DatePicker#custom-cell-rendering).
But I cannot pass cellRenderer through react component props.

<BryntumCalendar
   ref={calendarRef}
   {...calendarConfig}
   sidebar={{
     items: {
       datePicker: {
         cellRenderer: ({ cell, date }) => {
           return "fafa";
         }
       }
     }
   }}
</BryntumCalendar>;

Could you help me?


Post by saki »

The cellRenderer does not honor the return value but you need to manipulate cell.innerHTML. Thus:

cellRenderer: ({ cell, data }) => {
    cell.innerHTML += 'fafa';
}

should work.


Post by kobylin »

Thank you! It works.


Post Reply