support icon indicating copy to clipboard operation
support copied to clipboard

MonthView error when `sixWeeks : false, autoRowHeight : true`

Open marciogurka opened this issue 3 months ago • 2 comments

Forum post

"Hello Bryntum Support and Community,

I've encountered an issue in the Bryntum Calendar while working in month view mode. Specifically, when I configure the calendar with autoRowHeight: true and sixWeeks: false, it triggers an error in the console. I'm reaching out for guidance on how to resolve this issue or for any workarounds you might suggest.

Issue Description: Upon setting the calendar to month mode with the properties autoRowHeight: true and sixWeeks: false, an unexpected error is logged in the console. This occurs without any further interaction with the calendar. Related screenshot: Steps to Reproduce: Initialize the Bryntum Calendar in month view mode.

Apply the following configuration options:

  
javascript
   autoRowHeight: true,
   sixWeeks: false

Observe the error appearing in the browser's console upon loading the calendar.

import { Calendar } from '../../build/calendar.module.js?474872';
import shared from '../_shared/shared.module.js?474872';


const calendar = new Calendar({
    appendTo : 'container',

// Start life looking at this date
date : new Date("2025-02-01"),

sidebar : null,


modes : {
    month : {
        autoRowHeight    : true,
        sixWeeks: false,
    },
},
mode : 'month',

project : {
    eventStore : {
        useRawData : true,
        data       : null
    },
    assignmentStore : {
        data : null
    }
},
});

"

Go to https://bryntum.com/products/calendar/examples/megadataset/, and set sixWeeks:false in month view, and you'll see an error that's triggered

TypeError: Cannot read properties of null (reading 'dataset')
    at MonthView.getWeekContext

marciogurka avatar Apr 09 '24 12:04 marciogurka