Page 1 of 2

Copy/Paste Event on Calendar

Posted: Fri Feb 17, 2023 10:23 am
by tornike

Hi, I want to create copy/paste event on calendar, as I found out there is no feature on calendar currently, so I want to use eventMenu to do this. I added copy option on eventMenu, but his handler is not called, also after copy, I just want to right click on empty cell and paste it there, basically it copies everything, just change date and paste there. I couldn't find anything for right clicking any cell, it just opens browser's default menu. can you help me with this?

Screenshot 2023-02-17 122153.png
Screenshot 2023-02-17 122153.png (61.03 KiB) Viewed 639 times

Re: Copy/Paste Event on Calendar

Posted: Fri Feb 17, 2023 12:11 pm
by mats

This will be supported shortly (already implemented), so our recommendation would be to wait for the 5.4 release.

If you want to continue implementing it on your own, you can look at https://bryntum.com/products/calendar/docs/api/Calendar/feature/ScheduleMenu or you can listen to 'schedulecontextmenu' to show a menu or use the


Re: Copy/Paste Event on Calendar

Posted: Fri Feb 17, 2023 1:27 pm
by tornike

thanks, could you tell me approximately when will be released 5.4 version


Re: Copy/Paste Event on Calendar

Posted: Fri Feb 17, 2023 1:33 pm
by mats

Hopefully within 1-2 months! You could use a nightly build or beta before that too of course.


Re: Copy/Paste Event on Calendar

Posted: Fri Feb 17, 2023 1:35 pm
by tornike

also I tried Schedule menu, added it to script like this

Screenshot 2023-02-17 153346.png
Screenshot 2023-02-17 153346.png (72.87 KiB) Viewed 626 times

, but when I click on empty cell, still chrome context menu is opening and I get this error in console

2023-02-17 15_35_04-NVIDIA GeForce Overlay.png
2023-02-17 15_35_04-NVIDIA GeForce Overlay.png (123.85 KiB) Viewed 626 times

Re: Copy/Paste Event on Calendar

Posted: Fri Feb 17, 2023 2:20 pm
by mats

What version are you using? This works for me:

  scheduleMenu : {
            items : {
                // Knocks out the predefined addEvent item
                addEvent : null,

            // Add our own custom item
            disableDate : {
                icon : 'b-fa b-fa-calendar-times',
                text : 'Mark date unavailable',

                // Will look up ownership chain and find the Calendar
                onItem : 'up.showTimeInfo'
            }
        }
    }
},

showTimeInfo({ date }) {
    Toast.show(String(date));
},

Re: Copy/Paste Event on Calendar

Posted: Fri Feb 17, 2023 3:43 pm
by tornike

sorry, how could I check the version?


Re: Copy/Paste Event on Calendar

Posted: Fri Feb 17, 2023 3:48 pm
by tornike

I found probably, it's 5.1.3


Re: Copy/Paste Event on Calendar

Posted: Fri Feb 17, 2023 4:13 pm
by tornike

I updated it to 5.2.10 version, downloaded from customer zone, (updated only files and folders we are using, such locales, fonts folder and calendar.umd.min.js, calendar.stockholm.min.css and package.json files) and result is still the same


Re: Copy/Paste Event on Calendar

Posted: Sat Feb 18, 2023 3:01 pm
by alex.l

Hi tornike,

Could you please attach your runnable app with instructions how to build and run it, so we will be able to help you with that problem.