MVC Scheduler with custom event not refreshing correctly

5 posts, 0 answers
  1. Max
    Max avatar
    3 posts
    Member since:
    Nov 2013

    Posted 07 Oct 2017 Link to this post

    Hello all,

    I am using MVC scheduler and have created using a custom template editor. In the editor template, I set the end date via jquery based on parameters that the user selects. When I select to save the schedule is not updating correctly and show the default 30 minute. If I refresh the page I see the correct date. Right now I have it so after a save I refresh the page but that's not very efficient. If I manually edit the end date, it works correctly. 

     

    I am wondering if this is a bug or I maybe I am not setting the end date properly.

    I did look at the sample on the datetimepicker how you can dynamically set the date and time. I know this is correct but doesn't seem to work in the scheduler.

     

    Thanks in advance for the help,

    -Max

  2. Max
    Max avatar
    3 posts
    Member since:
    Nov 2013

    Posted 08 Oct 2017 in reply to Max Link to this post

    Looking at another post it looks like there is an event that needs to be fired in order to make this work. 

    jQuery("#<your controle name>").data("kendo<controlname>").trigger("change");

     

    -Max

  3. Dimitar
    Admin
    Dimitar avatar
    801 posts

    Posted 10 Oct 2017 Link to this post

    Hello Max,

    Please refer to the following Scheduler HowTo example, where a similar scenario is demonstrated (Setting up Scheduler custom edit and events templates).

    With the above example, the newly created events are being properly added to the dataSource of the widget and are displayed without triggering the change event. You can inspect the example and try to integrate it in your project. 
     
    In case the issue continues to persist, you can update the example and send it back to us for a review. This way we will be able to inspect it locally and advise you further.

    Regards,
    Dimitar
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  4. Max
    Max avatar
    3 posts
    Member since:
    Nov 2013

    Posted 10 Oct 2017 in reply to Dimitar Link to this post

    Hello Dimitar,

    Thank you for your response but I am not sure how your explanation applies to the issue that I was having. As I noted my issue is that I was setting the end date dynamically and later I found that I have to make a second call in order to trigger some event to completely populate the end date.

    The documentation you have pointed is not MVC :(.

     

    Thanks,

    -Max

     

     

  5. Dimitar
    Admin
    Dimitar avatar
    801 posts

    Posted 12 Oct 2017 Link to this post

    Hello Max,

    If the specified event is edited through the Scheduler's editEvent() method, then there should be no need to manually trigger the change event. If this is the case and the issue still persists, may I ask you to send us an isolated solution (with dummy data), where the described issue can be replicated? This way, I will be able to troubleshoot the cause of the problem and advise you further.

    Regards,
    Dimitar
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top