2

I don't see anything in API for disabling this behavior.

I just want users to have to click on a specific date.

corysimmons
  • 7,296
  • 4
  • 57
  • 65

2 Answers2

4

use the prop onSelecting. For example: onSelecting = {slot => false}

Morris
  • 948
  • 2
  • 9
  • 22
  • This worked for you? It still lets me select multiple events and prevents me from scrolling on mobile... – Taylor A. Leach Oct 29 '19 at 15:40
  • same here! It doesn't prevent me from dragging. – MS1 Jul 29 '20 at 13:07
  • My approach is not the best. But it works like this: while mouse pressed down, user can still feel "they are selecting areas", but once they let go of the mouse, nothing happens. – Morris Jul 30 '20 at 14:16
0

I had to get selection for clicked date, without drag. Used the onSelectSlot with required logic.

onSelectSlot={(e) => {
  if (e.slots?.length > 1) return; // or a message
  alert("onSelectSlot" + JSON.stringify(e));
}}

Note: this wont handle drag selection styling!!

Vivek V C
  • 7
  • 5