Skip to content

Error when setting visible date and max date in the past #10969

@marciogurka

Description

@marciogurka

Forum post

"Hi, when i try to set a visibleDate and maxDate in the past i get the following error: "Invalid start/end dates..."
I use your online basic example here: https://bryntum.com/products/schedulerpro/examples-scheduler/basic/
with the following config i get an error:

const scheduler = new Scheduler({
    appendTo         : 'container',
    resources,
    events,
    visibleDate: new Date(2024, 3, 1, 0),
    // startDate        : new Date(2017, 0, 1, 19),
    // endDate          : new Date(2017, 0, 1, 20),
    maxDate: new Date(2024, 3, 5, 0),
    viewPreset       : 'hourAndDay',
    rowHeight        : 50,
    barMargin        : 5,
    multiEventSelect : true,
    columns          : [
        { text : 'Name', field : 'name', width : 130 }
    ]
});

But with this config, with dates in the future its not producing an error:

const scheduler = new Scheduler({
    appendTo         : 'container',
    resources,
    events,
    visibleDate: new Date(2025, 3, 1, 0),
    // startDate        : new Date(2017, 0, 1, 19),
    // endDate          : new Date(2017, 0, 1, 20),
    maxDate: new Date(2025, 3, 5, 0),
    viewPreset       : 'hourAndDay',
    rowHeight        : 50,
    barMargin        : 5,
    multiEventSelect : true,
    columns          : [
        { text : 'Name', field : 'name', width : 130 }
    ]
});
"

What is the reason for this?

Metadata

Metadata

Assignees

Labels

OEMOEM customerbugSomething isn't workingforumIssues from forumhigh-priorityUrgent to have fixedlarge-accountReported by large customerpremiumresolvedFixed but not yet released (available in the nightly builds)

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions