Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
b06af51
feat(calendar/header): add disableArrowLeft/disableArrowRight props
lfkwtz Jun 21, 2018
f0d8bbc
Merge branch 'master' into master
lfkwtz Aug 30, 2018
ee2954a
Added options to use 'onVisibleMonthsChange' directly from <Agenda />
marllonfrizzo Feb 22, 2019
9683d40
Add disabledByDefault props to docs
osterbergmarcus Mar 20, 2019
6f5d9bc
Adding Week calendar
Inbal-Tish Jun 3, 2019
7cd1800
Merge branch 'master' of github.com:wix/react-native-calendars into f…
Inbal-Tish Jun 3, 2019
d44d2fa
changing dates to the first day of the week
Inbal-Tish Jun 3, 2019
071b014
render only 1 page from each side
Inbal-Tish Jun 3, 2019
ff97270
separate methods
Inbal-Tish Jun 3, 2019
a31b8f7
limit setDate on first scroll (invoked by initialScrollIndex)
Inbal-Tish Jun 4, 2019
cfb5415
moving update back to render
Inbal-Tish Jun 4, 2019
b0c3d75
reverting last change (firstScroll)
Inbal-Tish Jun 4, 2019
8a9b0d8
Merge branch 'master' of github.com:wix/react-native-calendars into f…
Inbal-Tish Jun 5, 2019
066a084
move items update before setDate
Inbal-Tish Jun 5, 2019
613f04e
Merge branch 'master' of github.com:wix/react-native-calendars into f…
Inbal-Tish Jun 5, 2019
03d1e94
reverting update items move
Inbal-Tish Jun 5, 2019
450f193
test
Inbal-Tish Jun 6, 2019
37c8498
Delete pom.xml
rotemmiz Jun 6, 2019
e7e9fa8
removing import
Inbal-Tish Jun 6, 2019
e9829b2
Merge branch 'master' of github.com:wix/react-native-calendars into f…
Inbal-Tish Jun 13, 2019
eab4f03
list performent
Inbal-Tish Jun 13, 2019
953d9f1
Merge branch 'master' of github.com:wix/react-native-calendars into f…
Inbal-Tish Jul 14, 2019
88995d4
merge fix
Inbal-Tish Jul 14, 2019
afec68a
Merge branch 'master' of github.com:wix/react-native-calendars into f…
Inbal-Tish Jul 14, 2019
f6bc167
Merge branch 'master' of https://github.com/wix/react-native-calendars
Jul 17, 2019
92f6f48
Adds a `keyExtractor` prop to CalendarList
albertc5 Jul 18, 2019
0431ebf
Merge branch 'master' of github.com:wix/react-native-calendars into f…
Inbal-Tish Jul 25, 2019
e7a040d
moving items update to onVisableItemsChanged
Inbal-Tish Jul 25, 2019
c99eedd
Add onEndReached and OnEndReachedThreshold to Flatlist props
vmarie Jul 29, 2019
d35f847
Revert "moving items update to onVisableItemsChanged"
Inbal-Tish Jul 31, 2019
6169ca9
Merge branch 'master' of github.com:wix/react-native-calendars into f…
Inbal-Tish Jul 31, 2019
e849395
Re-render the header when the renderArrow function changes
lucasmotta Aug 21, 2019
27a228d
Update README.md
sergei-zelinsky Aug 27, 2019
3a91cec
UPD Agenda scrollEventThrottle from 1 to 8
wscourge Aug 21, 2019
fea486c
Modify typo in README.md
Sep 16, 2019
011dec4
Merge branch 'master' of https://github.com/wix/react-native-calendars
Sep 26, 2019
c0d1ea4
Fix displayLoadingIndicator when no others props changes.
Sep 26, 2019
723fcf0
DRY in agenaHeight, reuse initialScrollPadPosition
CharlyJazz Oct 2, 2019
908c47d
bugfix/agenda-ui-issue-845: Change calendarOffset to fix ui issue aff…
Oct 7, 2019
cc2366a
Added ref to CalendarHeader
lukefanning Nov 12, 2019
b256edc
fix selectedDayTextColor not working
qvinh0704 Nov 21, 2019
b62e46a
support override stickySectionHeadersEnabled
wasutz Dec 4, 2019
5bdd733
bug fix
Inbal-Tish Dec 15, 2019
7581591
pod install
Inbal-Tish Dec 15, 2019
670be3d
Make project compile
LeoNatan Dec 15, 2019
1da9a5e
open example project for tablets
Inbal-Tish Dec 15, 2019
c30cb9c
Merge branch 'master' of github.com:wix/react-native-calendars into f…
Inbal-Tish Dec 19, 2019
dfc584a
update implementation for horizontal week scroll
ethanshar Dec 22, 2019
32c5c8a
fix issue when scorlling left in week calendar
ethanshar Dec 23, 2019
7108eda
clean up code
ethanshar Dec 23, 2019
2506caf
fix issue with marking date after week scroll
ethanshar Dec 23, 2019
c12d8aa
fix sync issues with current date updates
ethanshar Dec 23, 2019
4d75a69
Merge pull request #1015 from wix/feat/Expandable_week_scroll_android…
Inbal-Tish Dec 23, 2019
7b530bf
editing changelog
Inbal-Tish Dec 23, 2019
40b54ab
adding 'disableWeekScroll' prop
Inbal-Tish Dec 23, 2019
44c6091
Merge pull request #1018 from wix/feat/Expandable_week_scroll
ethanshar Dec 23, 2019
4d59fa5
Moving style to style file to allow overrides
Inbal-Tish Dec 24, 2019
60b8fb1
Moving width style from Week to WeekCalendar
Inbal-Tish Dec 24, 2019
a4f36d5
AgendaList - allow text transform override for section header text
Inbal-Tish Jan 12, 2020
c516e10
Make WeekCalendar a stand-alone component
Inbal-Tish Jan 13, 2020
a767d1d
fix onDayPress
Inbal-Tish Jan 13, 2020
437cc76
Adding week day names; adding demo screen
Inbal-Tish Jan 13, 2020
2b46b08
fix for container width
Inbal-Tish Jan 14, 2020
322228b
Fix ExpandableCalendar arrow override not working
mtieltjes Jan 15, 2020
2ba1457
Merge pull request #1037 from mtieltjes/master
Inbal-Tish Jan 16, 2020
ef829f5
Merge pull request #1036 from wix/feat/WeekCalendar_component
ethanshar Jan 16, 2020
b75c210
Allow passing keyExtractor function to AgendaList; Updating changelog
Inbal-Tish Jan 16, 2020
ba586b9
Merge pull request #1039 from wix/feat/AgendaList_keyExtractor
ethanshar Jan 16, 2020
7e55f8f
Adding hoist-non-react-statics dependency (issue #900)
Inbal-Tish Jan 19, 2020
85a56fb
Renaming unsafe life cycle methods
Inbal-Tish Jan 19, 2020
c9c3894
Merge pull request #1004 from wasutz/support-override-stickySectionHe…
Inbal-Tish Jan 19, 2020
5a8fb4d
Update index.js
Inbal-Tish Jan 19, 2020
1b353fc
Merge pull request #995 from qvinh0704/vinhbu
Inbal-Tish Jan 19, 2020
e020f3f
Merge pull request #986 from SolidStateGroup/feature/header-ref
Inbal-Tish Jan 19, 2020
993c09b
Merge pull request #953 from HaswinVidanage/bugfix/agenda-ui-issue-845
Inbal-Tish Jan 19, 2020
b9040aa
Merge pull request #948 from CharlyJazz/patch-1
Inbal-Tish Jan 19, 2020
bc0999a
fix disableTouchEvent not working; edit changelog
Inbal-Tish Jan 19, 2020
5448f4c
Merge branch 'master' of github.com:wix/react-native-calendars
Inbal-Tish Jan 19, 2020
5716c28
Merge pull request #939 from smarppy/fix-displayLoadingIndicator
Inbal-Tish Jan 19, 2020
acb68c8
Update index.js
Inbal-Tish Jan 19, 2020
56189e5
Merge pull request #928 from samslow/master
Inbal-Tish Jan 19, 2020
343c685
Merge pull request #912 from sergei-zelinsky/patch-1
Inbal-Tish Jan 19, 2020
3120305
Merge pull request #908 from wscourge/master
Inbal-Tish Jan 20, 2020
b05520b
Merge pull request #907 from lucasmotta/feature/render-arrow-changes
Inbal-Tish Jan 20, 2020
f250ecd
Merge pull request #893 from vmarie/upgrade/scroll2Load
Inbal-Tish Jan 20, 2020
c0805e2
Merge pull request #883 from r888888888/feature/add-key-extractor-pro…
Inbal-Tish Jan 20, 2020
d8eda0e
Adding 'onLongPress' support to Day type multi-period; editing CHANGELOG
Inbal-Tish Jan 20, 2020
67ebe41
Update README.md
Inbal-Tish Jan 20, 2020
37085da
Merge pull request #774 from osterbergmarcus/patch-1
Inbal-Tish Jan 20, 2020
23e2853
Merge pull request #746 from smarppy/master
Inbal-Tish Jan 20, 2020
e39f3ed
remove formatting changes
lfkwtz Jan 20, 2020
c766357
remove another formatting change
lfkwtz Jan 20, 2020
c42ae57
Merge branch 'master' into master
lfkwtz Jan 20, 2020
8e4ea87
fix missing comma
lfkwtz Jan 20, 2020
f05cfa8
dynamic update support
lfkwtz Jan 20, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ fastlane/Preview.html
fastlane/screenshots

# CocoaPods
/ios/Pods/
ios/Pods
113 changes: 105 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@

## [1.192.0] - 2019-06-25
### Fix
- CalendarProvider - Fix for warning on Image 'source' type.
- ExpandableCalendar - Fix shadow/elevation style.
- CalendarProvider - fix for warning on Image 'source' type.
- ExpandableCalendar - fix shadow/elevation style.

## [1.193.0] - 2019-06-26
### Bug Fix
- ExpandableCalendar - fix for week paddings. Changing knob container height and weekDays style.
- CalendarList/item - limit headerStyle to horizontal only.
- CalendarList/item - limit 'headerStyle' to horizontal only.

## [1.194.0] - 2019-06-30
### Added
- CalendarProvider - 'onMonthChange' event returning date object and updateSource.

## [1.195.0] - 2019-07-04
### Change
### Changed
- Components' props comment format.

## [1.196.0] - 2019-07-04
Expand All @@ -58,10 +58,10 @@

## [1.200.0] - 2019-07-18
### Added
- ExpandableCalendar - adding testID for knob.
- ExpandableCalendar - adding 'testID' for knob.

## [1.201.0] - 2019-07-25
### Change
### Changed
- eslint - updating to version 6.1.0.
- lodash - importing library instead of sub-libraries.

Expand Down Expand Up @@ -94,13 +94,110 @@
## [1.208.0] - 2019-08-15
### Added
- CalendarProvider - today button size for tablet.
Passing style prop to a container View.
Passing style prop to a container View.
- ExpandableCalendar - adjusting vertical mode open height for tablet in both orientations.

## [1.209.0] - 2019-08-20
### Fix
- CalendarProvider - Fix for children wrapper view.
- CalendarProvider - fix for children wrapper view.

## [1.213.0] - 2019-11-13
### Changed
- Upgrading react-native to version 61.4.0.

## [1.214.0] - 2019-12-12
### Fix
- Agenda - fix typo on 'scrollEnable' prop.
- ExpandableCalendar - fix passed props to CalendarList.

## [1.215.0] - 2019-12-23
### Added
- ExpandableCalendar - adding week scroll to closed position.

## [1.216.0] - 2019-12-24
### Fix
- Week - moving width style to style file.

## [1.217.0] - 2019-12-24
### Fix
- Week - moving width style to WeekCalendar.

## [1.218.0] - 2020-1-12
### Added
- AgendaList - allow text transform override for section header text.

## [1.221.0] - 2020-1-16
### Bug Fix
- ExpandableCalendar - fix 'renderArrow' (PR #1037).

## [1.223.0] - 2020-1-16
### Added
- WeekCalendar - new component.

## [1.224.0] - 2020-1-16
### Added
- AgendaList - allow passing 'keyExtractor'.

## [1.225.0] - 2020-1-19
### Bug Fix
- package.json - adding 'hoist-non-react-statics' dependency (fix issue #900).

## [1.226.0] - 2020-1-19
### Added
- Life cycle methods - renaming with UNSAFE_ prefix 'componentWillMount()' and 'componentWillReceiveProps()'.

## [1.227.0] - 2020-1-19
### Added
- AgendaList - allow passing 'stickySectionHeadersEnabled' (PR #1004).

## [1.228.0] - 2020-1-19
### Bug Fix
- Day custom - fix for 'selectedDayTextColor' not working (PR #995).

## [1.229.0] - 2020-1-19
### Added
- Calendar - adding ref to CalendarHeader (PR #986).

## [1.230.0] - 2020-1-19
### Fix
- Agenda - fix for calendar offset (PR #953).

## [1.231.0] - 2020-1-19
### Change
- Agenda - use 'initialScrollPadPosition()' (PR #948).

## [1.232.0] - 2020-1-19
### Bug Fix
- Day components - fix for 'disableTouchEvent' marking to disable interactions for all marking types.

## [1.233.0] = 2020-1-19
### Added
- Calendar - update when 'displayLoadingIndicator' changes (PR #939).

## [1.234.0] - 2020-1-19
### Fix
- Calendar and README - typo (PR #).

## [1.235.0] - 2020-1-19
### Fix
- README - typo (Pr #912).

## [1.236.0] - 2020-1-20
### Changed
- Agenda - 'scrollEventThrottle' from 1 to 8 (Pr #908).

## [1.237.0] - 2020-1-20
### Added
- CalendarHeader - re-render when 'renderArrow' changes (PR #907).

## [1.238.0] - 2020-1-20
### Added
- CalendarList - pass 'onEndReached' and 'onEndReachedThreshold' to FlatList (PR #893).

## [1.239.0] - 2020-1-20
### Added
- CalendarList - pass 'keyExtractor' (PR #883).

## [1.240.0] - 2020-1-20
### Added
- Day - adding 'onLongPress' support to type multi-period.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,12 @@ LocaleConfig.defaultLocale = 'fr';
showWeekNumbers={true}
// Handler which gets executed when press arrow icon left. It receive a callback can go back month
onPressArrowLeft={substractMonth => substractMonth()}
// Handler which gets executed when press arrow icon left. It receive a callback can go next month
// Handler which gets executed when press arrow icon right. It receive a callback can go next month
onPressArrowRight={addMonth => addMonth()}
// Disable left arrow. Default = false
disableArrowLeft={true}
// Disable right arrow. Default = false
disableArrowRight={true}
/>
```

Expand Down Expand Up @@ -286,6 +290,7 @@ The loading indicator next to month name will be displayed if `<Calendar />` has
dotColor: '#00adf5',
selectedDotColor: '#ffffff',
arrowColor: 'orange',
disabledArrowColor: '#d9e1e8',
monthTextColor: 'blue',
indicatorColor: 'blue',
textDayFontFamily: 'monospace',
Expand Down Expand Up @@ -451,6 +456,8 @@ An advanced agenda component that can display interactive listings for calendar
'2012-05-17': {marked: true},
'2012-05-18': {disabled: true}
}}
// If disabledByDefaut={true} dates flaged as not disabled will be enabled. Default = false
disabledByDefault={true}
// If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality. Make sure to also set the refreshing prop correctly.
onRefresh={() => console.log('refreshing...')}
// Set this true while waiting for new data from a refresh
Expand All @@ -472,7 +479,7 @@ An advanced agenda component that can display interactive listings for calendar

## Authors

* [Tautvilas Mecinskas](https://github.com/tautvilas/) - Initial code - [@tautvilas](https://twitter.com/TautviIas)
* [Tautvilas Mecinskas](https://github.com/tautvilas/) - Initial code - [@tautvilas](https://twitter.com/Tautvilas)
* Katrin Zotchev - Initial design - [@katrin_zot](https://twitter.com/katrin_zot)

See also the list of [contributors](https://github.com/wix/react-native-calendar-components/contributors) who participated in this project.
Expand Down
42 changes: 25 additions & 17 deletions example/src/screens/expandableCalendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
TouchableOpacity,
Button
} from 'react-native';
import {ExpandableCalendar, AgendaList, CalendarProvider} from 'react-native-calendars';
import {ExpandableCalendar, AgendaList, CalendarProvider, WeekCalendar} from 'react-native-calendars';


const today = new Date().toISOString().split('T')[0];
Expand Down Expand Up @@ -158,21 +158,28 @@ export default class ExpandableCalendarScreen extends Component {
showTodayButton
disabledOpacity={0.6}
// todayBottomMargin={16}
>
<ExpandableCalendar
// horizontal={false}
// hideArrows
// disablePan
// hideKnob
// initialPosition={ExpandableCalendar.positions.OPEN}
firstDay={1}
markedDates={this.getMarkedDates()} // {'2019-06-01': {marked: true}, '2019-06-02': {marked: true}, '2019-06-03': {marked: true}};
theme={this.getTheme()}
leftArrowImageSource={require('../img/previous.png')}
rightArrowImageSource={require('../img/next.png')}
// calendarStyle={styles.calendar}
// headerStyle={styles.calendar} // for horizontal only
/>
>
{this.props.weekView ?
<WeekCalendar
firstDay={1}
markedDates={this.getMarkedDates()}
theme={this.getTheme()}
/> :
<ExpandableCalendar
// horizontal={false}
// hideArrows
// disablePan
// hideKnob
// initialPosition={ExpandableCalendar.positions.OPEN}
firstDay={1}
markedDates={this.getMarkedDates()} // {'2019-06-01': {marked: true}, '2019-06-02': {marked: true}, '2019-06-03': {marked: true}};
theme={this.getTheme()}
leftArrowImageSource={require('../img/previous.png')}
rightArrowImageSource={require('../img/next.png')}
// calendarStyle={styles.calendar}
// headerStyle={styles.calendar} // for horizontal only
// disableWeekScroll
/>}
<AgendaList
sections={ITEMS}
extraData={this.state}
Expand All @@ -191,7 +198,8 @@ const styles = StyleSheet.create({
},
section: {
backgroundColor: '#f0f4f7',
color: '#79838a'
color: '#79838a',
textTransform: 'capitalize'
},
item: {
padding: 20,
Expand Down
10 changes: 9 additions & 1 deletion example/src/screens/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,18 @@ export default class MenuScreen extends Component {
<TouchableOpacity style={styles.menu} onPress={this.onExpandablePress.bind(this)}>
<Text style={styles.menuText}>Expandable Calendar</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.menu} onPress={this.onWeekPress.bind(this)}>
<Text style={styles.menuText}>Week Calendar</Text>
</TouchableOpacity>
</View>
);
}

pushScreen(screen) {
pushScreen(screen, props) {
Navigation.push(this.props.componentId, {
component: {
name: screen,
passProps: props,
options: {
topBar: {
title: {
Expand Down Expand Up @@ -66,6 +70,10 @@ export default class MenuScreen extends Component {
onExpandablePress() {
this.pushScreen('ExpandableCalendar');
}

onWeekPress() {
this.pushScreen('ExpandableCalendar', {weekView: true});
}
}

const styles = StyleSheet.create({
Expand Down
Loading