Open alperenkarip opened 1 year ago
same problem
I am not sure about re-render. Does it not automatically happen when the state changes?
On the second question about onWeekChanged
being called, I can't seem to reproduce it.
I have the following strip:
<CalendarStrip
scrollable={true}
startingDate={props.calendarStartDay}
selectedDate={props.calendarStartDay}
showMonth={false}
showDayName={false}
rightSelector={[]}
leftSelector={[]}
onWeekChanged={(start, end) => console.log(start, end)}
customDatesStyles={(date) => {
if (isDateSuccess(props.habitId, date)) {
return {
dateNameStyle: { color: 'blue' },
dateNumberStyle: { color: 'white' },
dateContainerStyle: { backgroundColor: 'green' },
}
}
return {};
}}
onDateSelected={(date) => updateHabitData(props.habitId, date)}
// datesWhitelist={(date) => date.isBefore(today)} // TODO: UTC offset
/>
As you can see, I am printing a log if the week changes. That is not printed when I select a date. If I click on the Week shifters (left, right arrows in your case), only thne the log is printed.
hi, i want to re-render calendar-strip when i change language of my app, but i failed. How do I re-render the calendar-strip when the app language changes? also how do I make onWeeksChanged work only when I click the right and left week buttons? I'm sorry for my bad english ?