Skip to content

Getting an Error while trying to move/reschedule event #455

Description

@MYXOMOPX

Hello! I'm getting error:

RangeError: Invalid time value
    at fe /node_modules/.vite/deps/@aldabil_react-scheduler.js?v=95ae6e7b:312:6)
    at Ce (/node_modules/.vite/deps/@aldabil_react-scheduler.js?v=95ae6e7b:303:10)
    at Ct (/node_modules/.vite/deps/@aldabil_react-scheduler.js?v=95ae6e7b:251:30)
    at /node_modules/.vite/deps/@aldabil_react-scheduler.js?v=95ae6e7b:2415:262
    at Array.flatMap (<anonymous>)
    at /node_modules/.vite/deps/@aldabil_react-scheduler.js?v=95ae6e7b:2415:247
    at Array.map (<anonymous>)
    at /node_modules/.vite/deps/@aldabil_react-scheduler.js?v=95ae6e7b:2414:21
    at _r (/node_modules/.vite/deps/@aldabil_react-scheduler.js?v=95ae6e7b:2525:88)
    at react-stack-bottom-frame (/node_modules/.vite/deps/react-dom_client.js?v=2c3f6a90:17424:20)

Code:

 const EVENTS: ProcessedEvent[] = [
    {
        event_id: 1,
        title: "Event 1",
        start: new Date(new Date(new Date().setHours(9)).setMinutes(0)),
        end: new Date(new Date(new Date().setHours(10)).setMinutes(0)),
        admin_id: [1, 2, 3, 4],
    },
];

function CalendarApp() {
    return (
        <Paper>
            <Scheduler
                view="month"
                events={EVENTS}
            />
        </Paper>
    )
}

My current versions of libraries:

    "@aldabil/react-scheduler": "^3.1.2",
    "@mui/x-date-pickers": "7.29.4",
    "@mui/material": "7.3.4",
    "date-fns": "4.1.0",
    "rrule": "^2.8.1",

Currently trying to debug this thing, but only found that for some reason event.start become an Invalid Date
This bugs reproduces both for drag-editing and for popup-editing

Tried to change versions as in basic-demo project, but same error appears

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions