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

HeaderText doesn't show the right year after passing the day at selectedDay

Open erliskryeziu opened this issue 2 years ago • 0 comments

Hello, I have a problem with the calendar strip. I have a custom date picker, which opens after I press the header text. Then this date picker sets as a prop a Moment day, and this prop is set at selectedDate. When I change only the date and the month, header text displays it good, but after I pick another year, it does not display the correct year (you can see in the video below). Can you give me any help?

<CalendarStrip scrollable style={{ height: '100%' }} calendarColor={'white'} onHeaderSelected={() => setDatepicker(true)} calendarHeaderStyle={{ color: 'black', marginBottom: 5 }} dateNumberStyle={{ color: '#CBCBCB', fontFamily: Typography.CERA_MEDIUM, fontSize: 14 }} dateNameStyle={{ color: 'black', fontFamily: Typography.CERA_MEDIUM, fontSize: 11 }} leftSelector={[]} rightSelector={[]} daySelectionAnimation={{ type: 'background', duration: 200, borderWidth: 1, highlightColor: 'black' }} onDateSelected={(selectedDate) => {props.setTodaysDate(_daysjs(selectedDate).toISOString()), props.setDate(_daysjs(selectedDate).toISOString()) }} selectedDate={todayDate} highlightDateNumberStyle={{ color: 'white', fontFamily: Typography.CERA_BOLD }} highlightDateNameStyle={{ color: 'white', fontFamily: Typography.CERA_BOLD }} locale={locale} startingDate={todayDate} / Screen Recording 2022-03-11 at 11.07.49.zip

erliskryeziu avatar Mar 11 '22 10:03 erliskryeziu