Our powerful JS Calendar component


Post 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 512 times
Attachments
2023-02-17 12_23_02-Calendar View.png
2023-02-17 12_23_02-Calendar View.png (53.86 KiB) Viewed 512 times

Post 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


Post by tornike »

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


Post by mats »

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


Post 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 499 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 499 times

Post 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));
},

Post by tornike »

sorry, how could I check the version?


Post by tornike »

I found probably, it's 5.1.3


Post 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


Post 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.

All the best,
Alex


Post Reply