get scheduler view startdate and enddate in navigate event

5 posts, 0 answers
  1. Anamika
    Anamika avatar
    157 posts
    Member since:
    Mar 2014

    Posted 03 Jul 2014 Link to this post

    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
  2. Rosen
    Admin
    Rosen avatar
    3253 posts

    Posted 07 Jul 2014 Link to this post

    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!
     
  3. Jiam
    Jiam avatar
    3 posts
    Member since:
    Jul 2014

    Posted 08 Jul 2014 Link to this post

    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)

  4. Jiam
    Jiam avatar
    3 posts
    Member since:
    Jul 2014

    Posted 10 Jul 2014 Link to this post

    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!

  5. Rosen
    Admin
    Rosen avatar
    3253 posts

    Posted 11 Jul 2014 Link to this post

    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!
     
Back to Top