Weekly Slider Calendar Custom Widget using GlideDateTime
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2023 10:15 AM
Hi All! I have a use case where a customer wants a weekly slider widget similar to this image:
I am currently looking into using the GlideDateTime API, but I cannot figure out how to get multiple days to show up all at once. I can get the current date and days before and after, but I need them to show all 5 days of the week. Here is what I have thus far:
Server Script:
(function() {
/* populate the 'data' object */
/* e.g., data.table = $sp.getValue('table'); */
var gdt = new GlideDateTime().getDate();
//gdt.addDaysUTC(-1);
gs.addInfoMessage(gdt.getByFormat('EEEE dd'));
})();
0 REPLIES 0