Args.event.start in Scheduler sometimes returns date in ISO8601 format

So I’ve noticed that one of my calendar events is not working properly, and it seems that for this particular event only, the “args.event.start” value is not what I would expect.

First of all, I’ve set up a test page to look at here:
https://app.benjicare.com/test.php

It’s a simplified version of my code but it serves the purpose.

If you debug the following part:

  onEventClick: function (args, inst) {
    var scheduleid = args.event.Id;
    var scheduleUTCdate = args.event.start;
    var year = scheduleUTCdate.getFullYear();
    var month = scheduleUTCdate.getMonth() + 1;
    var day = scheduleUTCdate.getDate();
    var scheduledate = year + '-' + padLeft(month,2) + '-' + padLeft(day,2);
    viewSchedule(scheduleid,scheduledate);

You’ll find that if you click on the first event, args.event.start is returned as

"2022-06-09T08:40:00"

But if you click on the second event, args.event.start is returned as a UTC object, as I would expect. I obviously need that code to behave consistently, so why is my first event returning an ISO formatted date string? Is this a bug in mobiscroll? Or am I doing something wrong?

EDIT: To see what I mean, please navigate to June 9th, 2022 to see the two events.

So I realize now that the difference is that the recurring event returns a UTC date object and the non-recurring event returns an ISO date string. Is this by design? It seems inconsistent to me.

This is also making things difficult for drag to resize. On a recurring event, the onEventDragEnd event does not return the new end time. Again, is this by design? Or do I need to tell my users that they can’t drag to resize a recurring event?

Hi Vincent,

Could you please provide me the login credentials so I can take a look at your test page?

Credentials? It shouldn’t be asking you for login credentials.

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

Sorry Gabi. I tested it on another computer and it was indeed checking for authentication, which I never noticed on my own computer because I’m always authenticated. Anyway, please take a look again. It should not be redirecting you now, and please navigate to June 9th, 2022 to see the two events I am referring to.