react-event-calendar icon indicating copy to clipboard operation
react-event-calendar copied to clipboard

onClick/onDoubleClick event handlers for day cells (not just events)

Open idolize opened this issue 8 years ago • 5 comments

It'd be awesome to have events that trigger when clicking/double clicking on a day (aside from an event).

My use case is for this to trigger a "create event" flow for that day.

idolize avatar May 24 '16 20:05 idolize

Not a bad idea! Shouldn't be much of an issue to make that happen. Let me see what we can cook up for you.

dptoot avatar May 24 '16 21:05 dptoot

@idolize Your thoughts on where this event should bubble. My assumption is that we don't want it bubbling through to event clicks as well, that it would only be on clicks within empty areas of day elements.

dptoot avatar May 25 '16 12:05 dptoot

Yes, I agree it would only be for empty areas of day elements.

Devs can already register event listeners for clicks on events with onEventClick, so with this as a separate event then devs can have full control over clicks in both scenarios.

idolize avatar May 25 '16 20:05 idolize

Is somebody already on this, or could I try my luck? I'd be my first contribution but I think this isn't too complicated.

calvinclaus avatar Jun 15 '16 14:06 calvinclaus

@calvinclaus PR looks pretty good to me (I was going to make one myself but it seems like you already got it 😄 )

@dptoot do you mind taking a look so we can get this in? I'd love to start using it.

idolize avatar Jun 16 '16 20:06 idolize