React-native-calendars: ExpandableCalendar

Created on 1 Apr 2020  路  4Comments  路  Source: wix/react-native-calendars

Hello, does ExpandableCalendar support all Calendar props? onDayPress seems doesnt work.

Most helpful comment

You can use

 <CalendarProvider
                            date={current}
                            onDateChanged={this.onDateChange}
                            onMonthChange={this.monthChanged}
                            key={current}
                            style={[{flex: 0}]}
 >

then on the function can catch updated source
onDateChange(date, updateSource) { console.log(updateSource, ' NOTE UPDATE SOURCE'); }

All 4 comments

You can use

 <CalendarProvider
                            date={current}
                            onDateChanged={this.onDateChange}
                            onMonthChange={this.monthChanged}
                            key={current}
                            style={[{flex: 0}]}
 >

then on the function can catch updated source
onDateChange(date, updateSource) { console.log(updateSource, ' NOTE UPDATE SOURCE'); }

You can use

 <CalendarProvider
                            date={current}
                            onDateChanged={this.onDateChange}
                            onMonthChange={this.monthChanged}
                            key={current}
                            style={[{flex: 0}]}
 >

then on the function can catch updated source
onDateChange(date, updateSource) { console.log(updateSource, ' NOTE UPDATE SOURCE'); }

Thanks man, this works perfectly.

@farhansamu21
ExpandableCalendar supports onDayPress.
If it doesn't work, please open a bug and upload your code.

https://github.com/wix/react-native-calendars/blob/master/src/expandableCalendar/index.js#L48
https://github.com/wix/react-native-calendars/blob/master/src/calendar-list/index.js#L28
https://github.com/wix/react-native-calendars/blob/master/src/calendar/index.js#L55

onDayPress Wont respond when we wrap ExpandableCalendar with CalendarProvider component.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

moiiiiit picture moiiiiit  路  4Comments

sommeshEwall picture sommeshEwall  路  3Comments

filippoitaliano picture filippoitaliano  路  3Comments

sonnguyenit picture sonnguyenit  路  3Comments

idlework picture idlework  路  4Comments