search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Set a future date in scheduler

Asked by Jonas Karlsson (CGI)
4 years ago.

Having some issues with scheduler and setting a future date.

In our solution we are plotting out loads of data for a day and we want to show the scheduler for a selected day scaled in hours.

The init method looks like this.
this.dp.showNonBusiness = false;
this.dp.businessBeginsHour = 5;
this.dp.businessEndsHour = 23;
this.dp.timeFomat = 'Clock24Hours';
this.dp.startDate = startDate;
this.dp.scale = 'Hour';

As soon as i set a date in the future I get an error. Doesn´t matter if I set it in the init method or change it by

this.dp.startDate = selectedDate;
this.dp.update();

It works if i set an older date without any problems.
This is a huge blocker for us. I would really appreciate any help. Am I missing something?

I also get a really odd behavior if I change this.dp.days in the init method.
If I set it to 3 I can switch to a date 3 days in the future.. even if I set it for tomorrow. :)

Using Version: 1514 DayPilot Pro.
And the error occurs in daypilot-all.min.js:27564 Uncaught TypeError:
Cannot read property 'end' of undefined

Regards,
Jonas

Answer posted by Jonas Karlsson
4 years ago.

Solved it by using this.dp.StartDate = new DayPilot.Date(selectedDate)

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.