React-big-calendar: Right click on the event display a menu

Created on 16 Nov 2018  路  7Comments  路  Source: jquense/react-big-calendar

I hope to add right click callback. Thanks.

wontfix

Most helpful comment

It may be helpful to set a custom eventWrapper like <Calendar components={{ eventWrapper }} />.

Here is an example: https://codepen.io/vzvu3k6k/pen/ewRGwW

All 7 comments

@fengdachao use custom Event component and onContextMenu prop?

I also want this functionality. Using custom event components doesn't work very well because the custom event component doesn't 'fill' the graphical event, so right clicking on parts of the event won't bring up a menu.

I'm using a very convoluted alternative approach, where the onContextMenu event handler is on the containing div of the calendar, then I'm using custom Event components with a data prop containing an ID, and some clunky DOM traversal to get that ID from the synthetic event which works, but is pretty ugly.

Happy to allow this via the eventPropGetter if anyone wants to add support for it there.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

We are also facing with a need for this capability, and I'll be happy to be open a PR.

@jquense - is there a reason why you would prefer this on the eventPropGetter, instead of adding an "onContextMenu" prop to EventCell.js, same as onDoubleClick and onClick?

Thanks!

It may be helpful to set a custom eventWrapper like <Calendar components={{ eventWrapper }} />.

Here is an example: https://codepen.io/vzvu3k6k/pen/ewRGwW

Hello,

Any news for this feature?

If I use the example above, it works but I get this error:

Warning: React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.

Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nirchernia picture nirchernia  路  3Comments

zhming0 picture zhming0  路  3Comments

tiaaaa123 picture tiaaaa123  路  4Comments

kromit picture kromit  路  4Comments

martinnov92 picture martinnov92  路  3Comments