ScheduleDateRange Selector Formatter Manipulating
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2023 06:09 AM - edited ‎08-26-2023 06:38 AM
The Resource management plugin has a functionality to add events to your calendar. This event page writes records to the resource_event table. The form contains a Schedule Date Range Selector formatter with the schedule_date_range.xml macro
Issue 1. I am not able to find this XML in my UI Macros module. Is this because this is an OOB macro?
Issue 2. I need to be able to do some UI customization via Client script or UI policy that when the Type is selected as Time Off, the All Day checkbox should be checked automatically. But since the All Day checkbox is a part of the above mentioned fomatter I am not aware of how to access it via a script.
I found something when looking at the HTML of the page using tools in Chrome, but from there still not sure if it's actually the UI Macro or something else. I found when looking at the source for the page with the formatter on it that it referenced a script "/scripts/ScheduleDateRange.js */". When plugging that into the address of my instance, I got back a script that I could open and view, as seen below:
I was unable to find the Script in Servicenow in table, I got that code by folllowing URL;
https://devxxxx.service-now.com/scripts/ScheduleDateRange.jsx?v=06-23-2023_2224
/*! RESOURCE: /scripts/ScheduleDateRange.js */
var ScheduleDateRange = Class.create();
ScheduleDateRange.prototype = {
initialize: function() {
this.timeZone = "";
this.dateTimeFormat = g_user_date_time_format.replace(" z","").replace("z ","");
this.dateFormat = g_user_date_format.replace(" z","").replace("z ","");
this.timeFormat = this.dateTimeFormat.substring(this.dateFormat.length + 1);
......... and soon script continues
},
Adding a screenshot of the event page:
Any help would be sincerely appreciated.