Scheduler available start/end dates

Contains tips for configurators working with Aware IM
Post Reply
hpl123
Posts: 2641
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Scheduler available start/end dates

Post by hpl123 »

Hi all,
Here is a tip on how to limit the available start/end dates in the scheduler so say I want the user to only be able to select dates 2024 and onward (init. script):

Code: Select all

config.min=new Date('2024/1/1')
Or dates only up til 2025:

Code: Select all

config.max=new Date('2025/12/1');
Or both i.e range Jan 1st 2024 until Dec 31st 2025:

Code: Select all

config.min=new Date('2024/1/1');config.max=new Date('2025/12/1');
Henrik (V8 Developer Ed. - Windows)
PointsWell
Posts: 1476
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Scheduler available start/end dates

Post by PointsWell »

Cool, can that be modified to use a BO attribute so you can vary the date easily?
hpl123
Posts: 2641
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Scheduler available start/end dates

Post by hpl123 »

PointsWell wrote: Tue Nov 12, 2024 4:24 am Cool, can that be modified to use a BO attribute so you can vary the date easily?
Yes, that is what I intend to do, that and/or populate date via JS e.g if I need current date or something i.e then do directly client side minimizing Aware´s involvement.
Henrik (V8 Developer Ed. - Windows)
hpl123
Posts: 2641
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Scheduler available start/end dates

Post by hpl123 »

Update, here is the range version with dates calculated at runtime and it is from todays date until December 31st next year (i.e the following year based on current year):

Code: Select all

const currentDate = new Date();config.min = currentDate;const nextYear = currentDate.getFullYear() + 1;config.max = new Date(nextYear, 11, 31);
Henrik (V8 Developer Ed. - Windows)
Post Reply