dptoot / react-event-calendar

A React calendar component to display events
131 stars 55 forks source link

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

Open idolize opened 8 years ago

idolize commented 8 years ago

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.

dptoot commented 8 years ago

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 commented 8 years ago

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

idolize commented 8 years ago

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.

calvinclaus commented 8 years ago

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.

idolize commented 8 years ago

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