onefinestay / react-daterange-picker

Other
563 stars 209 forks source link

adeded event.preventDefault() to touchEnd #191

Closed jontelm closed 6 years ago

jontelm commented 6 years ago

Added event.preventDefault() to not let the event bubble up to the next component https://github.com/facebook/react/issues/11387

AlanFoster commented 6 years ago

Hey, thanks for the PR. Out of curiosity, what is your use case for this functionality?

jontelm commented 6 years ago

After the user have chosen the range we open a modal on top of the calendar for the user to select from a list of options how they want to mark that range (Available, Unavailable, Primary Booked, Booked).

The problem we had without this event.preventDefault() is that the modal got a click / touch on the options directly when it opens so it was closed again.

AlanFoster commented 6 years ago

Thanks! :+1:

AlanFoster commented 6 years ago

@jontelm This is currently available in the latest release candidate, would you mind testing out 2.0.0-rc.1 :+1: