react-native-calendar-kit icon indicating copy to clipboard operation
react-native-calendar-kit copied to clipboard

Selection moves to first day when other day is selected for the first time.

Open Resource-4 opened this issue 1 year ago • 3 comments

Try to select another day for the first time when the calendar loads or swipe but it moves to the first day i checked it not happening when i pass numberOfDays more than 1

https://github.com/user-attachments/assets/ddb769f3-6f8c-4a4b-bed6-019f26fe911c

version : 2.2.1 expo:52.0.11 react-native:0.76.3

<CalendarContainer ref={calendarRef} events={events} numberOfDays={1} theme={theme} useHaptic={true} useAllDayEvent={true} allowDragToCreate={true} allowDragToEdit={true} allowPinchToZoom={true} defaultDuration={30} spaceFromTop={10} spaceFromBottom={6} minDate={new Date()} maxDate={moment().add(11, 'day').format('YYYY-MM-DD')} onDateChanged={onDateChanged} onDragEventStart={hapticEffect} initialTimeIntervalHeight={120} dragStep={30} onDragCreateEventStart={onDragCreateEventStart} onDragEventEnd={onDragEventEnd} onDragSelectedEventStart={onDragCreateEventStart} onDragSelectedEventEnd={onDragSelectedEventEnd} selectedEvent={selectedEvent} onPressBackground={onPressBackground} unavailableHours={unavailableHours} onDragCreateEventEnd={handleDragCreateEnd} onPressEvent={onPressEvent} onLongPressEvent={onLongPressEvent} > <CalendarHeader dayBarHeight={0} headerBottomHeight={0} renderHeaderItem={() => null} eventInitialMinutes={1} collapsedItems={1} /> <CalendarBody renderEvent={(event) => RenderEvent(event, onPressEdit) } /> </CalendarContainer>

Resource-4 avatar Jan 02 '25 09:01 Resource-4

I face the same issue, when minDate={new Date()} it happens, could you help us about it?

basaksilasanli avatar Jan 20 '25 11:01 basaksilasanli

Same problem here. Any solution?

AkbarBakhshi avatar Feb 17 '25 01:02 AkbarBakhshi

any solution on this? having the same problem

Avinashsinh007 avatar Jul 31 '25 15:07 Avinashsinh007