Schedule Entry - The dates and times you entered were not valid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2017 04:55 AM
Hi,
I'm creating a maintenance calendar where users could check and book maintenance works. I created it to Maintenance schedules -> Maintenance calendar
I'm trying to create a new service catalog page where users could book a maintenance schedule for maintenance. Service catalog page doesn't create a new reservation because when trying to submit the error occurs: "The dates and times you entered were not valid". Any ideas?
And here is the service catalog view:
and the following error occurs:
Thanks,
Joonas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2017 07:10 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2017 08:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-01-2023 10:20 AM
In case anyone sees this now... The below script works.
You need to use the GlideScheduleDateTime() class to insert schedule entries via a script:
var startGSDT = new GlideScheduleDateTime("20231125T150000Z");
var endGSDT = new GlideScheduleDateTime("20231205T150000Z");
var schedule = new GlideRecord("cmn_schedule_span");
schedule.initialize();
schedule.show_as = "busy";
schedule.start_date_time = startGSDT;
schedule.end_date_time = endGSDT;
schedule.schedule = "schedule sys id";
schedule.insert();