Premium support for our pure JavaScript UI components


Post by rahulranjan »

Hi
How can we get start and End Time of particular Calendar . Starting and Ending working Time

  const calendarID = 'business';
    const project = new ProjectModel({
      calendarsData: this.calendarsData
    });
    const details = project.calendarManagerStore.getById(calendarID);
    console.log(details);

I tried it but details doesn't contain any time ?


Post by pmiklashevich »

CalendarModel doesn't have any start/end times. It has just different rules which specify if the time is a working time or not. Please see scheduler engine docs for the methods available on the Calendar, for example:
skipNonWorkingTime, forEachAvailabilityInterval, etc.

Could you please explain what time you're interested in?

Pavlo Miklashevych
Sr. Frontend Developer


Post by rahulranjan »

Hi
If i select business calendar the starting time is 8:00 AM . This time i was looking for


Post by pmiklashevich »

gantt.project.calendar.skipNonWorkingTime(new Date(2019, 0, 14))

Just pass the date you want to get the first available interval time for.

Pavlo Miklashevych
Sr. Frontend Developer


Post by rahulranjan »

Hi

Property 'skipNonWorkingTime' does not exist on type 'CalendarModel'.

Error i am getting


Post by pmiklashevich »

We will fix the typings. Thank you for the feedback.

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply