Select all events for a day

8 posts, 1 answers
  1. Zdzislaw Ziental
    Zdzislaw Ziental avatar
    30 posts
    Member since:
    Mar 2018

    Posted 18 Jun 2019 Link to this post

    I have several events on the same day (allday), and I have a requirement to move all events from one day to another.

    I know that today it is possible to hold the CTRL key and select one by one, but I would like to know if there is any feature to select all from the same day.
    Or if it does not exist, I can put a button below the day for the user click, and i do this programmatically.

    Thank you.

  2. Dimitar
    Admin
    Dimitar avatar
    796 posts

    Posted 20 Jun 2019 Link to this post

    Hello,

    You are indeed correct that the select functionality of the Scheduler allows to select multiple events by holding the "CTRL" key and then drag them to the desired slot. This could be tested in the following demo:


    Alternatively, you could also create a custom button with two DatePicker widgets that retrieves the events in the specified range and then moves them to the specified date. Refer to the following Dojo example that demonstrates a similar scenario:


    In the above demo, click the "Move All Events" button to open the dialog, then select 13 June 2013 in the 'From' DatePicker and 12 June 2013 in the 'To' Datepicker. Then, clicking on the 'Done' button will correctly move only the AllDay events to the specified date. Note that the DatePickers initially start for the current year(2019), however as the demo service returns events for year 2013 you should correctly select 2013 year from the DatePicker and then choose the 13/12 June dates to test the example.

    Regards,
    Dimitar
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Zdzislaw Ziental
    Zdzislaw Ziental avatar
    30 posts
    Member since:
    Mar 2018

    Posted 21 Jun 2019 in reply to Dimitar Link to this post

    Excellent solution. Even better than I imagined.

     

    Thank you

  4. Zdzislaw Ziental
    Zdzislaw Ziental avatar
    30 posts
    Member since:
    Mar 2018

    Posted 21 Jun 2019 in reply to Dimitar Link to this post

    Dimitar, could you help me with one more problem?

    I made a modification (suggested by another Admin), but when I change the date, the button does not work when the date change.

    $(document).ready(function () {
    $(".k-scheduler-navigation").prepend('<li class="k-state-default k-header"><a role="button" href="#" class="k-button k-pdf"><span class="k-icon k-i-file-pdf mr-1"></span>Export to PDF</a></li>');
    $("#btnMoveAll").kendoButton();
    });

     

    What do I need to put in the Navigate for the button to work again?

  5. Dimitar
    Admin
    Dimitar avatar
    796 posts

    Posted 24 Jun 2019 Link to this post

    Hello,

    I have added the modification to the previously sent Dojo and the export button works correctly in the Week View. Could you test the example and let me know if this also works correctly on your end?

    https://dojo.telerik.com/EmuXiXaK/6

    Regards,
    Dimitar
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  6. Zdzislaw Ziental
    Zdzislaw Ziental avatar
    30 posts
    Member since:
    Mar 2018

    Posted 24 Jun 2019 in reply to Dimitar Link to this post

    Dimitar, thanks for the reply.
    But your example has the same problem.

    Click the "Move All" button as the popup opens normally.
    But after changing the date, clicking on the navigation buttons and trying to click on the "Move All" button the popup will not open anymore.
  7. Answer
    Dimitar
    Admin
    Dimitar avatar
    796 posts

    Posted 25 Jun 2019 Link to this post

    Hello,

    The described behavior could be bypassed with a simple check - if the Dialog widget is already initialized, then the open() method is used to show the widget, otherwise it is initialized:
    function eventOpen(){
      var dialog = $("#dialog").getKendoDialog();
        
      if (dialog == undefined) {   
        $("#dialog").kendoDialog({ ... });
      }
    }

    Regards,
    Dimitar
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  8. Zdzislaw Ziental
    Zdzislaw Ziental avatar
    30 posts
    Member since:
    Mar 2018

    Posted 25 Jun 2019 in reply to Dimitar Link to this post

    Working, thanks for your help.
Back to Top