Our powerful JS Calendar component


Post by juris »

Hello together,

I have a few question regarding the Calendar monthView.

  • Is it possible to have the week number on the far left side like the time axis on the week view. Here is a screenshot how it should look like:

    Screenshot 2022-08-08 154036.png
    Screenshot 2022-08-08 154036.png (22.94 KiB) Viewed 423 times
  • Is it possible to use localization inside the headerRenderer? I would like to display the day written out instead of the abbreviation. For example, instead of Mon, Monday should be displayed.

Thank you in advance and best regards!


Post by marcio »

Hey juris,

You can use https://www.bryntum.com/docs/calendar/api/Calendar/widget/MonthView#config-showWeekColumn
to display the week, and if you want to change some style, you can use https://www.bryntum.com/docs/calendar/api/Calendar/widget/MonthView#config-weekRenderer

About the localization, yes, it's possible, by using https://www.bryntum.com/docs/calendar/api/Core/localization/Localizable#function-L-static like this

headerRenderer : function(el, dayNumber, weekday) {
                el.innerHTML = `<div>${this.L(%keyToYourLocalizedText%)}</div>`;
                return el;
            }

Best regards,
Márcio


Post by Animal »

See the month view in this example for a customized week column: https://bryntum.com/examples/calendar/custom-rendering:

Screenshot 2022-08-09 at 12.01.14.png
Screenshot 2022-08-09 at 12.01.14.png (87.98 KiB) Viewed 406 times

Post by juris »

Hello together,

thank you very much for your support!

HeaderRenderer is working perfectly.

Thank you anc best regards!


Post Reply