This is a migrated thread and some comments may be shown as answers.

get scheduler view startdate and enddate in navigate event

4 Answers 707 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Anamika
Top achievements
Rank 1
Anamika asked on 03 Jul 2014, 02:20 PM
Hello,

Scheduler_navigate Event gives e.date. But i would like to get the selected view start and enddate in navigate function. Currently this.view().startDate() and endDate() inside navigate function gives previous date range(before navigate). is there a way to get new date range to requery datasource for current view

Anamika

4 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 07 Jul 2014, 08:34 AM
Hello Anamika,

The navigate event should not be used to rebind the scheduler, as it may lead to unexpected results. In order to constrain the data return by the server for the current display dates rage  you should use the approach demonstrated in this code library project.

Regards,
Rosen
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Jiam
Top achievements
Rank 1
answered on 08 Jul 2014, 06:57 PM
Hi Rosen,

This is actually a *very* basic requirement.

Can you please clarify more (and at least explain more in the documentation) how this should be accomplished?

Thanks!

p.s: we're considering your scheduler for a projects and its weird to see a lot of areas documented but have this basic thing not covered (i.e. being able to specify to backend which start/end date is being queried to populate a datasource)

0
Jiam
Top achievements
Rank 1
answered on 10 Jul 2014, 02:32 PM
If anyone else has any clue how to do this - please share (I don't see this explained clearly anywhere in the current docs) - thanks!

0
Rosen
Telerik team
answered on 11 Jul 2014, 11:16 AM
Hi Jiam,

If you look at the code library mentioned in my previous post, you will noticed that the functionality in question is implemented by sending the current view's start and end dates as additional data of the read request. Than on the server, the events are filters based on this date range and return back to the client. Note that the server operations are enable in order to instruct the DataSource to issue new request when date range, views current data etc. are  changed.

Also note that in the navigate event the "future" start and end dates are not available, as the event is triggered before the view is actually navigated or changed. Therefore, only the new selected data is available.

Regards,
Rosen
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Scheduler
Asked by
Anamika
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Jiam
Top achievements
Rank 1
Share this question
or