├── .buildkite └── pipeline.yml ├── .bundle └── config ├── .eslintrc.js ├── .github └── stale.yml ├── .gitignore ├── .npmignore ├── .nvmrc ├── .prettierignore ├── .prettierrc.json ├── .yarnrc ├── .yarnrc.yml ├── Gemfile ├── Gemfile.lock ├── ISSUE_TEMPLATE.md ├── LICENSE ├── README.md ├── android ├── app │ ├── build.gradle │ ├── debug.keystore │ ├── proguard-rules.pro │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── ic_launcher-playstore.png │ │ ├── ic_launcher.png │ │ ├── java │ │ └── com │ │ │ └── calendarsexample │ │ │ ├── MainActivity.kt │ │ │ └── MainApplication.kt │ │ └── res │ │ ├── drawable │ │ └── rn_edit_text_material.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── ic_launcher_background.xml │ │ ├── strings.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── babel.config.js ├── demo └── assets │ ├── agenda.gif │ ├── calendar-list.gif │ ├── calendar.gif │ ├── day-header-style.png │ ├── expandable-calendar.gif │ ├── horizontal-calendar-list.gif │ ├── loader.png │ ├── marking1.png │ ├── marking2.png │ ├── marking3.png │ ├── marking4.png │ ├── marking5.png │ ├── marking6.png │ ├── multi-marking.png │ ├── timeline-calendar.gif │ └── week-calendar.gif ├── detox.config.js ├── docsRNC ├── .gitignore ├── README.md ├── babel.config.js ├── docs │ ├── Components │ │ ├── Agenda.md │ │ ├── AgendaList.md │ │ ├── Calendar.md │ │ ├── CalendarList.md │ │ ├── CalendarProvider.md │ │ ├── ExpandableCalendar.md │ │ ├── Timeline.md │ │ └── WeekCalendar.md │ ├── intro.md │ └── testing.md ├── docusaurus.config.js ├── package.json ├── sidebars.js ├── src │ ├── components │ │ ├── HomepageFeatures.js │ │ └── HomepageFeatures.module.css │ ├── css │ │ └── custom.css │ └── pages │ │ ├── index.js │ │ ├── index.module.css │ │ └── markdown-page.md ├── static │ ├── .nojekyll │ └── img │ │ ├── calendar-markings.png │ │ ├── calendar.png │ │ ├── expandableCalendar.png │ │ ├── logo.png │ │ └── timeline-calendar.png └── tsconfig.json ├── e2e ├── agenda.spec.js ├── app.spec.js ├── calendars.spec.js ├── calendarsList.spec.js ├── expandableCalendar.spec.js ├── horizontalList.spec.js ├── init.js ├── mocha.opts └── week-calendar.spec.js ├── example ├── .gitignore ├── app.json └── src │ ├── app.tsx │ ├── img │ ├── close.png │ ├── logo.png │ ├── next.png │ ├── next@2x.png │ ├── next@3x.png │ ├── previous.png │ ├── previous@2x.png │ ├── previous@3x.png │ └── settings.png │ ├── mocks │ ├── AgendaItem.tsx │ ├── agendaItems.ts │ ├── theme.ts │ └── timelineEvents.ts │ ├── screens │ ├── agendaInfiniteListScreen.tsx │ ├── agendaScreen.tsx │ ├── calendarListScreen.tsx │ ├── calendarPlaygroundScreen.tsx │ ├── calendarScreen.tsx │ ├── expandableCalendarScreen.tsx │ ├── menuScreen.tsx │ ├── newCalendarListScreen.tsx │ ├── playgroundScreen.tsx │ └── timelineCalendarScreen.tsx │ ├── testIDs.ts │ └── wdyr.ts ├── index.android.js ├── index.ios.js ├── ios ├── .xcode.env ├── CalendarsExample.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── CalendarsExample.xcscheme ├── CalendarsExample.xcworkspace │ └── contents.xcworkspacedata ├── CalendarsExample │ ├── AppDelegate.h │ ├── AppDelegate.mm │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── 1024x1024.png │ │ │ ├── 120x120-1.png │ │ │ ├── 120x120.png │ │ │ ├── 180x180.png │ │ │ ├── 40x40.png │ │ │ ├── 58x58.png │ │ │ ├── 60x60.png │ │ │ ├── 80x80.png │ │ │ ├── 87x87.png │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Info.plist │ ├── LaunchScreen.storyboard │ ├── PrivacyInfo.xcprivacy │ └── main.m ├── CalendarsExampleTests │ ├── CalendarsExampleTests.m │ └── Info.plist ├── Podfile └── Podfile.lock ├── jest.config.js ├── metro.config.js ├── package.json ├── pom.xml ├── scripts ├── build-docs.js ├── postinstall.js ├── release.js └── test-e2e.js ├── src ├── Profiler.tsx ├── __tests__ │ ├── index.android.js │ └── index.ios.js ├── agenda │ ├── agenda.api.json │ ├── img │ │ └── knob@2x.png │ ├── index.tsx │ ├── platform-style.ios.ts │ ├── platform-style.ts │ ├── reservation-list │ │ ├── index.tsx │ │ ├── reservation.tsx │ │ └── style.ts │ └── style.ts ├── calendar-list │ ├── __tests__ │ │ └── index.spec.js │ ├── calendarList.api.json │ ├── driver.ts │ ├── index.tsx │ ├── item.tsx │ ├── new.tsx │ └── style.ts ├── calendar │ ├── __tests__ │ │ └── index.spec.js │ ├── calendar.api.json │ ├── day │ │ ├── basic │ │ │ ├── index.tsx │ │ │ └── style.ts │ │ ├── dot │ │ │ ├── index.tsx │ │ │ └── style.ts │ │ ├── driver.ts │ │ ├── index.tsx │ │ ├── marking │ │ │ ├── index.tsx │ │ │ └── style.ts │ │ └── period │ │ │ ├── index.tsx │ │ │ └── style.ts │ ├── driver.ts │ ├── header │ │ ├── driver.ts │ │ ├── index.tsx │ │ └── style.ts │ ├── img │ │ ├── next.png │ │ ├── next@1.5x.android.png │ │ ├── next@2x.android.png │ │ ├── next@2x.ios.png │ │ ├── next@3x.android.png │ │ ├── next@4x.android.png │ │ ├── previous.png │ │ ├── previous@1.5x.android.png │ │ ├── previous@2x.android.png │ │ ├── previous@2x.ios.png │ │ ├── previous@3x.android.png │ │ └── previous@4x.android.png │ ├── index.tsx │ └── style.ts ├── commons │ ├── WeekDaysNames.tsx │ └── constants.ts ├── componentUpdater.spec.js ├── componentUpdater.ts ├── dateutils.spec.js ├── dateutils.ts ├── day-state-manager.ts ├── expandableCalendar │ ├── AgendaList │ │ ├── agendaList.api.json │ │ ├── agendaList.tsx │ │ ├── commons.tsx │ │ └── infiniteAgendaList.tsx │ ├── Context │ │ ├── Provider.tsx │ │ ├── asCalendarConsumer.tsx │ │ ├── calendarProvider.api.json │ │ ├── index.ts │ │ └── todayButton.tsx │ ├── WeekCalendar │ │ ├── __tests__ │ │ │ └── index.spec.js │ │ ├── driver.ts │ │ ├── index.tsx │ │ ├── new.tsx │ │ └── weekCalendar.api.json │ ├── __tests__ │ │ ├── expandableCalendarTestKit.tsx │ │ └── index.spec.ts │ ├── commons.ts │ ├── driver.ts │ ├── expandableCalendar.api.json │ ├── index.tsx │ ├── style.ts │ └── week.tsx ├── hooks.ts ├── img │ ├── down.png │ ├── down@1.5x.png │ ├── down@2x.png │ ├── down@3x.png │ ├── down@4x.png │ ├── up.png │ ├── up@1.5x.png │ ├── up@2x.png │ ├── up@3x.png │ └── up@4x.png ├── index.ts ├── infinite-list │ └── index.tsx ├── interface.spec.js ├── interface.ts ├── momentResolver.ts ├── services │ ├── index.ts │ └── services.spec.js ├── style.ts ├── testIDs.js ├── testUtils.js ├── timeline-list │ ├── index.tsx │ ├── timelineList.api.json │ └── useTimelinePages.ts ├── timeline │ ├── EventBlock.tsx │ ├── NowIndicator.tsx │ ├── Packer.ts │ ├── Timeline.tsx │ ├── TimelineHours.tsx │ ├── __tests__ │ │ ├── Packer.spec.js │ │ └── presenter.spec.js │ ├── helpers │ │ └── presenter.ts │ ├── style.ts │ ├── timeline.api.json │ └── useTimelineOffset.ts ├── types.ts ├── utils │ └── __tests__ │ │ └── Playground.perf.js └── velocityTracker.ts ├── tsconfig.json └── yarn.lock /.buildkite/pipeline.yml: -------------------------------------------------------------------------------- 1 | env: 2 | LC_ALL: 'en_US' 3 | steps: 4 | - block: ":rocket: Release!" 5 | prompt: "Fill out the details for release" 6 | if: 'build.message =~ /^release\$/i' 7 | fields: 8 | - select: "IS_SNAPSHOT_BUILD" 9 | key: "is-snapshot" 10 | hint: "Publish snapshot version" 11 | default: 'false' 12 | options: 13 | - label: "True" 14 | value: true 15 | - label: "False" 16 | value: false 17 | - select: "IS_HOTFIX_BUILD" 18 | key: "is-hotfix" 19 | hint: "Publish hotfix version" 20 | default: 'false' 21 | options: 22 | - label: "True" 23 | value: true 24 | - label: "False" 25 | value: false 26 | 27 | - label: "Build" 28 | command: | 29 | nvm install 30 | yarn 31 | yarn test 32 | yarn build:ts 33 | if [[ $BUILDKITE_PULL_REQUEST == 'false' ]];then 34 | yarn release 35 | fi 36 | -------------------------------------------------------------------------------- /.bundle/config: -------------------------------------------------------------------------------- 1 | BUNDLE_PATH: "vendor/bundle" 2 | BUNDLE_FORCE_RUBY_PLATFORM: 1 3 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | es6: true, 4 | node: true, 5 | 'jest/globals': true 6 | }, 7 | globals: { 8 | expect: true, 9 | it: true, 10 | describe: true 11 | }, 12 | root: true, 13 | extends: ['@react-native', 'plugin:react-hooks/recommended', 'plugin:@typescript-eslint/recommended'], 14 | parser: '@typescript-eslint/parser', 15 | parserOptions: { 16 | ecmaFeatures: { 17 | experimentalObjectRestSpread: true, 18 | jsx: true 19 | }, 20 | sourceType: 'module' 21 | }, 22 | plugins: ['react', 'react-native', 'jest', '@typescript-eslint'], 23 | rules: { 24 | 'prettier/prettier': ['warn'], 25 | 'comma-dangle': ['error', 'never'], 26 | 'curly': 'off', 27 | 'eol-last': 'error', 28 | 'no-unused-expressions': 'off', 29 | 'max-len': ['warn', {code: 120, ignoreComments: true, ignoreStrings: true}], 30 | 'new-cap': 'off', 31 | 'no-mixed-operators': ['off'], 32 | 'no-trailing-spaces': 'off', 33 | 'no-undef': 'off', 34 | 'operator-linebreak': 'off', 35 | 'semi': ['error', 'always'], 36 | '@typescript-eslint/ban-ts-comment': 1, 37 | '@typescript-eslint/explicit-function-return-type': 0, 38 | '@typescript-eslint/no-shadow': 0, 39 | '@typescript-eslint/no-unused-vars': ['warn', {argsIgnorePattern: '^_'}], 40 | '@typescript-eslint/no-use-before-define': 0, 41 | '@typescript-eslint/no-var-requires': 0, 42 | 'react/jsx-tag-spacing': [ 43 | 'error', 44 | { 45 | closingSlash: 'never', 46 | beforeSelfClosing: 'never', 47 | afterOpening: 'never', 48 | beforeClosing: 'never' 49 | } 50 | ], 51 | 'react/jsx-no-bind': [ 52 | 'off', 53 | { 54 | ignoreRefs: true, 55 | allowArrowFunctions: false, 56 | allowBind: false 57 | } 58 | ], 59 | 'react/jsx-uses-react': 2, 60 | 'react/jsx-uses-vars': 2, 61 | 'react-native/no-inline-styles': 1 62 | } 63 | }; 64 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 90 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 30 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - Bug report 8 | - Feature request 9 | - merge-candidate 10 | # Label to use when marking an issue as stale 11 | staleLabel: stale 12 | # Comment to post when marking an issue as stale. Set to `false` to disable 13 | markComment: > 14 | This issue has been automatically marked as stale because it has not had 15 | recent activity. It will be closed if no further activity occurs. Thank you 16 | for your contributions. 17 | # Comment to post when closing a stale issue. Set to `false` to disable 18 | closeComment: false 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | .idea 4 | .vscode 5 | package-lock.json 6 | 7 | # OSX 8 | # 9 | .DS_Store 10 | 11 | # Xcode 12 | # 13 | build/ 14 | *.pbxuser 15 | !default.pbxuser 16 | *.mode1v3 17 | !default.mode1v3 18 | *.mode2v3 19 | !default.mode2v3 20 | *.perspectivev3 21 | !default.perspectivev3 22 | xcuserdata 23 | *.xccheckout 24 | *.moved-aside 25 | DerivedData 26 | *.hmap 27 | *.ipa 28 | *.xcuserstate 29 | ios/.xcode.env.local 30 | # project.xcworkspace 31 | 32 | # Android/IntelliJ 33 | # 34 | build/ 35 | .idea 36 | .gradle 37 | local.properties 38 | *.iml 39 | *.hprof 40 | .cxx/ 41 | *.keystore 42 | !debug.keystore 43 | 44 | # node.js 45 | # 46 | node_modules/ 47 | npm-debug.log 48 | 49 | # yarn 50 | yarn-error.log 51 | **/.yarn/cache 52 | **/.yarn/install-state.gz 53 | **/.yarn/yarn.build.json 54 | 55 | # fastlane 56 | # 57 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 58 | # screenshots whenever they are needed. 59 | # For more information about the recommended setup visit: 60 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 61 | 62 | **/fastlane/report.xml 63 | **/fastlane/Preview.html 64 | **/fastlane/screenshots 65 | **/fastlane/test_output 66 | 67 | # Ruby / CocoaPods 68 | ios/Pods 69 | ios/Podfile.lock 70 | /vendor/bundle/ 71 | 72 | .eslintcache 73 | .reassure 74 | 75 | # Temporary files created by Metro to check the health of the file watcher 76 | .metro-health-check* 77 | 78 | # testing 79 | /coverage 80 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 20 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | build 2 | node_modules 3 | ios 4 | android 5 | package-lock.json -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "avoid", 3 | "bracketSameLine": false, 4 | "bracketSpacing": false, 5 | "endOfLine": "auto", 6 | "printWidth": 120, 7 | "proseWrap": "preserve", 8 | "semicolons": true, 9 | "singleQuote": true, 10 | "trailingComma": "none" 11 | } 12 | -------------------------------------------------------------------------------- /.yarnrc: -------------------------------------------------------------------------------- 1 | --registry "https://registry.npmjs.org/" -------------------------------------------------------------------------------- /.yarnrc.yml: -------------------------------------------------------------------------------- 1 | nodeLinker: node-modules 2 | 3 | # yarnPath: .yarn/releases/yarn-3.6.4.cjs 4 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version 4 | ruby ">= 2.6.10" 5 | 6 | # Cocoapods 1.15 introduced a bug which break the build. We will remove the upper 7 | # bound in the template on Cocoapods with next React Native release. 8 | gem 'cocoapods', '>= 1.13', '< 1.15' 9 | gem 'activesupport', '>= 6.1.7.5', '< 7.1.0' 10 | gem 'xcodeproj', '< 1.26.0' 11 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | CFPropertyList (3.0.7) 5 | base64 6 | nkf 7 | rexml 8 | activesupport (6.1.7.10) 9 | concurrent-ruby (~> 1.0, >= 1.0.2) 10 | i18n (>= 1.6, < 2) 11 | minitest (>= 5.1) 12 | tzinfo (~> 2.0) 13 | zeitwerk (~> 2.3) 14 | addressable (2.8.7) 15 | public_suffix (>= 2.0.2, < 7.0) 16 | algoliasearch (1.27.5) 17 | httpclient (~> 2.8, >= 2.8.3) 18 | json (>= 1.5.1) 19 | atomos (0.1.3) 20 | base64 (0.2.0) 21 | claide (1.1.0) 22 | cocoapods (1.14.3) 23 | addressable (~> 2.8) 24 | claide (>= 1.0.2, < 2.0) 25 | cocoapods-core (= 1.14.3) 26 | cocoapods-deintegrate (>= 1.0.3, < 2.0) 27 | cocoapods-downloader (>= 2.1, < 3.0) 28 | cocoapods-plugins (>= 1.0.0, < 2.0) 29 | cocoapods-search (>= 1.0.0, < 2.0) 30 | cocoapods-trunk (>= 1.6.0, < 2.0) 31 | cocoapods-try (>= 1.1.0, < 2.0) 32 | colored2 (~> 3.1) 33 | escape (~> 0.0.4) 34 | fourflusher (>= 2.3.0, < 3.0) 35 | gh_inspector (~> 1.0) 36 | molinillo (~> 0.8.0) 37 | nap (~> 1.0) 38 | ruby-macho (>= 2.3.0, < 3.0) 39 | xcodeproj (>= 1.23.0, < 2.0) 40 | cocoapods-core (1.14.3) 41 | activesupport (>= 5.0, < 8) 42 | addressable (~> 2.8) 43 | algoliasearch (~> 1.0) 44 | concurrent-ruby (~> 1.1) 45 | fuzzy_match (~> 2.0.4) 46 | nap (~> 1.0) 47 | netrc (~> 0.11) 48 | public_suffix (~> 4.0) 49 | typhoeus (~> 1.0) 50 | cocoapods-deintegrate (1.0.5) 51 | cocoapods-downloader (2.1) 52 | cocoapods-plugins (1.0.0) 53 | nap 54 | cocoapods-search (1.0.1) 55 | cocoapods-trunk (1.6.0) 56 | nap (>= 0.8, < 2.0) 57 | netrc (~> 0.11) 58 | cocoapods-try (1.2.0) 59 | colored2 (3.1.2) 60 | concurrent-ruby (1.3.5) 61 | escape (0.0.4) 62 | ethon (0.16.0) 63 | ffi (>= 1.15.0) 64 | ffi (1.17.1) 65 | fourflusher (2.3.1) 66 | fuzzy_match (2.0.4) 67 | gh_inspector (1.1.3) 68 | httpclient (2.9.0) 69 | mutex_m 70 | i18n (1.14.7) 71 | concurrent-ruby (~> 1.0) 72 | json (2.7.6) 73 | minitest (5.25.4) 74 | molinillo (0.8.0) 75 | mutex_m (0.3.0) 76 | nanaimo (0.3.0) 77 | nap (1.1.0) 78 | netrc (0.11.0) 79 | nkf (0.2.0) 80 | public_suffix (4.0.7) 81 | rexml (3.4.1) 82 | ruby-macho (2.5.1) 83 | typhoeus (1.4.1) 84 | ethon (>= 0.9.0) 85 | tzinfo (2.0.6) 86 | concurrent-ruby (~> 1.0) 87 | xcodeproj (1.25.1) 88 | CFPropertyList (>= 2.3.3, < 4.0) 89 | atomos (~> 0.1.3) 90 | claide (>= 1.0.2, < 2.0) 91 | colored2 (~> 3.1) 92 | nanaimo (~> 0.3.0) 93 | rexml (>= 3.3.6, < 4.0) 94 | zeitwerk (2.6.18) 95 | 96 | PLATFORMS 97 | ruby 98 | 99 | DEPENDENCIES 100 | activesupport (>= 6.1.7.5, < 7.1.0) 101 | cocoapods (>= 1.13, < 1.15) 102 | xcodeproj (< 1.26.0) 103 | 104 | RUBY VERSION 105 | ruby 2.6.10p210 106 | 107 | BUNDLED WITH 108 | 1.17.2 109 | -------------------------------------------------------------------------------- /ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please make our job easier by filling this template out to completion. If you're requesting a feature instead of reporting a bug, please feel free to skip the Environment and Reproducible Demo sections. 2 | 3 | ## Description 4 | 5 | 1-2 sentences describing the problem you're having or the feature you'd like to request. 6 | 7 | ## Expected Behavior 8 | 9 | What action did you perform, and what did you expect to happen? 10 | 11 | ## Observed Behavior 12 | 13 | What actually happened when you performed the above actions? 14 | 15 | If there's an error message, please paste the *full terminal output and error message* in this code block: 16 | 17 | ``` 18 | Error text goes here! 19 | ``` 20 | 21 | ## Environment 22 | 23 | Please run these commands in the project folder and fill in their results: 24 | 25 | * `npm ls react-native-calendars`: 26 | * `npm ls react-native`: 27 | 28 | Also specify: 29 | 30 | 1. Device/emulator/simulator & OS version: 31 | 32 | ## Reproducible Demo 33 | 34 | Please provide a minimized reproducible demonstration of the problem you're reporting. 35 | 36 | Issues that come with minimal repro's are resolved much more quickly than issues where a maintainer has to reproduce themselves. 37 | 38 | ## Screenshots 39 | 40 | Screenshots or gifs of the issue and the suggested fix will help us move faster with the review process. 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Wix.com 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/android/app/debug.keystore -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /android/app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/android/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /android/app/src/main/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/android/app/src/main/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/java/com/calendarsexample/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.calendarsexample 2 | 3 | import android.os.Bundle; 4 | 5 | import com.facebook.react.ReactActivity 6 | import com.facebook.react.ReactActivityDelegate 7 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled 8 | import com.facebook.react.defaults.DefaultReactActivityDelegate 9 | 10 | class MainActivity : ReactActivity() { 11 | 12 | /** 13 | * Returns the name of the main component registered from JavaScript. This is used to schedule 14 | * rendering of the component. 15 | */ 16 | override fun getMainComponentName(): String = "CalendarsExample" 17 | 18 | /** 19 | * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] 20 | * which allows you to enable New Architecture with a single boolean flags [fabricEnabled] 21 | */ 22 | override fun createReactActivityDelegate(): ReactActivityDelegate = 23 | DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled) 24 | 25 | override fun onCreate(savedInstanceState: Bundle?) { 26 | super.onCreate(null) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/calendarsexample/MainApplication.kt: -------------------------------------------------------------------------------- 1 | package com.calendarsexample 2 | 3 | import android.app.Application 4 | import com.facebook.react.PackageList 5 | import com.facebook.react.ReactApplication 6 | import com.facebook.react.ReactHost 7 | import com.facebook.react.ReactNativeHost 8 | import com.facebook.react.ReactPackage 9 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load 10 | import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost 11 | import com.facebook.react.defaults.DefaultReactNativeHost 12 | import com.facebook.react.flipper.ReactNativeFlipper 13 | import com.facebook.soloader.SoLoader 14 | 15 | class MainApplication : Application(), ReactApplication { 16 | 17 | override val reactNativeHost: ReactNativeHost = 18 | object : DefaultReactNativeHost(this) { 19 | override fun getPackages(): List = 20 | PackageList(this).packages.apply { 21 | // Packages that cannot be autolinked yet can be added manually here, for example: 22 | // add(MyReactNativePackage()) 23 | } 24 | 25 | override fun getJSMainModuleName(): String = "index" 26 | 27 | override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG 28 | 29 | override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED 30 | override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED 31 | } 32 | 33 | override val reactHost: ReactHost 34 | get() = getDefaultReactHost(this.applicationContext, reactNativeHost) 35 | 36 | override fun onCreate() { 37 | super.onCreate() 38 | SoLoader.init(this, false) 39 | if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { 40 | // If you opted-in for the New Architecture, we load the native entry point for this app. 41 | load() 42 | } 43 | ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager) 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/rn_edit_text_material.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 21 | 22 | 23 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | RNCalendars 3 | 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext { 3 | buildToolsVersion = "34.0.0" 4 | minSdkVersion = 21 5 | compileSdkVersion = 34 6 | targetSdkVersion = 34 7 | ndkVersion = "25.1.8937393" 8 | kotlinVersion = "1.8.0" 9 | } 10 | repositories { 11 | google() 12 | mavenCentral() 13 | } 14 | dependencies { 15 | classpath("com.android.tools.build:gradle") 16 | classpath("com.facebook.react:react-native-gradle-plugin") 17 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") 18 | } 19 | } 20 | 21 | apply plugin: "com.facebook.react.rootproject" 22 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m 13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | # Automatically convert third-party libraries to use AndroidX 25 | android.enableJetifier=true 26 | 27 | # Use this property to specify which architecture you want to build. 28 | # You can also override it from the CLI using 29 | # ./gradlew -PreactNativeArchitectures=x86_64 30 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 31 | 32 | # Use this property to enable support to the new architecture. 33 | # This will allow you to use TurboModules and the Fabric render in 34 | # your application. You should enable this flag either if you want 35 | # to write custom TurboModules/Fabric components OR use libraries that 36 | # are providing them. 37 | newArchEnabled=false 38 | 39 | # Use this property to enable or disable the Hermes JS engine. 40 | # If set to false, you will be using JSC instead. 41 | hermesEnabled=true 42 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%"=="" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%"=="" set DIRNAME=. 29 | @rem This is normally unused 30 | set APP_BASE_NAME=%~n0 31 | set APP_HOME=%DIRNAME% 32 | 33 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 34 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 35 | 36 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 37 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 38 | 39 | @rem Find java.exe 40 | if defined JAVA_HOME goto findJavaFromJavaHome 41 | 42 | set JAVA_EXE=java.exe 43 | %JAVA_EXE% -version >NUL 2>&1 44 | if %ERRORLEVEL% equ 0 goto execute 45 | 46 | echo. 47 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 48 | echo. 49 | echo Please set the JAVA_HOME variable in your environment to match the 50 | echo location of your Java installation. 51 | 52 | goto fail 53 | 54 | :findJavaFromJavaHome 55 | set JAVA_HOME=%JAVA_HOME:"=% 56 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 57 | 58 | if exist "%JAVA_EXE%" goto execute 59 | 60 | echo. 61 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 62 | echo. 63 | echo Please set the JAVA_HOME variable in your environment to match the 64 | echo location of your Java installation. 65 | 66 | goto fail 67 | 68 | :execute 69 | @rem Setup the command line 70 | 71 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 72 | 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if %ERRORLEVEL% equ 0 goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | set EXIT_CODE=%ERRORLEVEL% 85 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 86 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 87 | exit /b %EXIT_CODE% 88 | 89 | :mainEnd 90 | if "%OS%"=="Windows_NT" endlocal 91 | 92 | :omega 93 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'CalendarsExample' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | includeBuild('../node_modules/@react-native/gradle-plugin') 5 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:@react-native/babel-preset'], 3 | plugins: [ 4 | [ 5 | 'module-resolver', 6 | { 7 | extensions: ['.js', '.jsx', '.ts', '.tsx'], 8 | root: ['.'], 9 | alias: { 10 | 'react-native-calendars': './src/index.ts' 11 | } 12 | } 13 | ] 14 | ] 15 | }; 16 | -------------------------------------------------------------------------------- /demo/assets/agenda.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/demo/assets/agenda.gif -------------------------------------------------------------------------------- /demo/assets/calendar-list.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/demo/assets/calendar-list.gif -------------------------------------------------------------------------------- /demo/assets/calendar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/demo/assets/calendar.gif -------------------------------------------------------------------------------- /demo/assets/day-header-style.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/demo/assets/day-header-style.png -------------------------------------------------------------------------------- /demo/assets/expandable-calendar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/demo/assets/expandable-calendar.gif -------------------------------------------------------------------------------- /demo/assets/horizontal-calendar-list.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/demo/assets/horizontal-calendar-list.gif -------------------------------------------------------------------------------- /demo/assets/loader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/demo/assets/loader.png -------------------------------------------------------------------------------- /demo/assets/marking1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/demo/assets/marking1.png -------------------------------------------------------------------------------- /demo/assets/marking2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/demo/assets/marking2.png -------------------------------------------------------------------------------- /demo/assets/marking3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/demo/assets/marking3.png -------------------------------------------------------------------------------- /demo/assets/marking4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/demo/assets/marking4.png -------------------------------------------------------------------------------- /demo/assets/marking5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/demo/assets/marking5.png -------------------------------------------------------------------------------- /demo/assets/marking6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/demo/assets/marking6.png -------------------------------------------------------------------------------- /demo/assets/multi-marking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/demo/assets/multi-marking.png -------------------------------------------------------------------------------- /demo/assets/timeline-calendar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/demo/assets/timeline-calendar.gif -------------------------------------------------------------------------------- /demo/assets/week-calendar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/demo/assets/week-calendar.gif -------------------------------------------------------------------------------- /detox.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | configurations: { 3 | "ios.sim.debug": { 4 | binaryPath: "ios/build/Build/Products/Debug-iphonesimulator/CalendarsExample.app", 5 | build: "xcodebuild -workspace ios/CalendarsExample.xcworkspace -scheme CalendarsExample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build", 6 | type: "ios.simulator", 7 | device: { 8 | type: "iPhone 11", 9 | os: "iOS 13.7" 10 | } 11 | }, 12 | "ios.sim.release": { 13 | binaryPath: "ios/build/Build/Products/Release-iphonesimulator/CalendarsExample.app", 14 | build: "xcodebuild -workspace ios/CalendarsExample.xcworkspace -scheme CalendarsExample -configuration Release -sdk iphonesimulator -derivedDataPath ios/build", 15 | type: "ios.simulator", 16 | device: { 17 | type: "iPhone 11", 18 | os: "iOS 13.7" 19 | } 20 | } 21 | }, 22 | artifacts: { 23 | plugins: { 24 | uiHierarchy: process.env.JENKINS_CI ? "enabled" : undefined 25 | } 26 | }, 27 | testRunner: "mocha" 28 | }; 29 | -------------------------------------------------------------------------------- /docsRNC/.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | /node_modules 3 | 4 | # Production 5 | /build 6 | 7 | # Generated files 8 | .docusaurus 9 | .cache-loader 10 | 11 | # Misc 12 | .DS_Store 13 | .env.local 14 | .env.development.local 15 | .env.test.local 16 | .env.production.local 17 | 18 | npm-debug.log* 19 | yarn-debug.log* 20 | yarn-error.log* 21 | -------------------------------------------------------------------------------- /docsRNC/README.md: -------------------------------------------------------------------------------- 1 | # Website 2 | 3 | This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. 4 | 5 | ### Installation 6 | 7 | ``` 8 | $ yarn 9 | ``` 10 | 11 | ### Local Development 12 | 13 | ``` 14 | $ yarn start 15 | ``` 16 | 17 | This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. 18 | 19 | ### Build 20 | 21 | ``` 22 | $ yarn build 23 | ``` 24 | 25 | This command generates static content into the `build` directory and can be served using any static contents hosting service. 26 | 27 | ### Deployment 28 | 29 | Using SSH: 30 | 31 | ``` 32 | $ USE_SSH=true yarn deploy 33 | ``` 34 | 35 | Not using SSH: 36 | 37 | ``` 38 | $ GIT_USER= yarn deploy 39 | ``` 40 | 41 | If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. 42 | -------------------------------------------------------------------------------- /docsRNC/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')] 3 | }; 4 | -------------------------------------------------------------------------------- /docsRNC/docs/Components/AgendaList.md: -------------------------------------------------------------------------------- 1 | Agenda list component for the `ExpandableCalendar` component. 2 | [(code example)](https://github.com/wix/react-native-calendars/blob/master/example/src/screens/expandableCalendarScreen.tsx) 3 | :::info 4 | This component extends **[FlatList](https://reactnative.dev/docs/flatlist)** props. 5 | ::: 6 | **NOTE: This component should be wrapped with `CalendarProvider` component.** 7 | 8 |
9 | 10 |
11 | 12 | ## API 13 | 14 | ### theme 15 | 16 | Specify theme properties to override specific styles for calendar parts 17 | Theme 18 | 19 | ### dayFormat 20 | 21 | Day format in section title. Formatting values: http://arshaw.com/xdate/#Formatting 22 | string 23 | 24 | ### dayFormatter 25 | 26 | A function to custom format the section header's title 27 | (arg0: string) => string 28 | 29 | ### useMoment 30 | 31 | Whether to use moment.js for date string formatting 32 | boolean 33 | 34 | ### markToday 35 | 36 | Whether to mark today's title with the 'Today, ...' string 37 | boolean 38 | 39 | ### avoidDateUpdates 40 | 41 | Whether to block the date change in calendar (and calendar context provider) when agenda scrolls 42 | boolean 43 | 44 | ### scrollToNextEvent 45 | 46 | Whether to enable scrolling the agenda list to the next date with content when pressing a day without content 47 | boolean 48 | 49 | ### viewOffset 50 | 51 | Offset scroll to the section 52 | number 53 | 54 | ### sectionStyle 55 | 56 | The style passed to the section view 57 | ViewStyle 58 | -------------------------------------------------------------------------------- /docsRNC/docs/Components/CalendarList.md: -------------------------------------------------------------------------------- 1 | Calendar list component 2 | [(code example)](https://github.com/wix/react-native-calendars/blob/master/example/src/screens/calendarListScreen.tsx) 3 | :::info 4 | This component extends **[Calendar](https://github.com/wix/react-native-calendars/blob/master/src/calendar/index.tsx), [FlatList](https://reactnative.dev/docs/flatlist)** props. 5 | ::: 6 | 7 |
8 | 9 |
10 | 11 | ## API 12 | 13 | ### pastScrollRange 14 | 15 | Max amount of months allowed to scroll to the past 16 | number 17 | 18 | ### futureScrollRange 19 | 20 | Max amount of months allowed to scroll to the future 21 | number 22 | 23 | ### calendarStyle 24 | 25 | Specify style for calendar container element 26 | ViewStyle 27 | 28 | ### calendarHeight 29 | 30 | Dynamic calendar height 31 | number 32 | 33 | ### calendarWidth 34 | 35 | Used when calendar scroll is horizontal, (when pagingEnabled = false) 36 | number 37 | 38 | ### staticHeader 39 | 40 | Whether to use a fixed header that doesn't scroll (when horizontal = true) 41 | boolean 42 | 43 | ### showScrollIndicator 44 | 45 | Whether to enable or disable vertical / horizontal scroll indicator 46 | boolean 47 | 48 |
49 | 50 | ## Calendar List Examples 51 | 52 |
53 | 54 | `` is scrollable semi-infinite calendar composed of `` components. Currently it is possible to scroll 4 years back and 4 years to the future. All parameters that are available for `` are also available for this component. There are also some additional params that can be used: 55 | 56 | ```javascript 57 | {console.log('now these months are visible', months);}} 60 | // Max amount of months allowed to scroll to the past. Default = 50 61 | pastScrollRange={50} 62 | // Max amount of months allowed to scroll to the future. Default = 50 63 | futureScrollRange={50} 64 | // Enable or disable scrolling of calendar list 65 | scrollEnabled={true} 66 | // Enable or disable vertical scroll indicator. Default = false 67 | showScrollIndicator={true} 68 | ...calendarParams 69 | /> 70 | ``` 71 | 72 | #### Horizontal CalendarList 73 | 74 | 75 | 76 | You can also make the `CalendarList` scroll horizontally. To do that you need to pass specific props to the `CalendarList`: 77 | 78 | ```javascript 79 | 89 | ``` 90 | -------------------------------------------------------------------------------- /docsRNC/docs/Components/CalendarProvider.md: -------------------------------------------------------------------------------- 1 | Calendar context provider component 2 | [(code example)](https://github.com/wix/react-native-calendars/blob/master/example/src/screens/expandableCalendarScreen.tsx) 3 | :::info 4 | This component extends **[Context](https://reactjs.org/docs/context.html)** props. 5 | ::: 6 | 7 |
8 | 9 | ## API 10 | 11 | ### theme 12 | 13 | Specify theme properties to override specific styles for calendar parts 14 | Theme 15 | 16 | ### style 17 | 18 | Specify style for calendar container element 19 | ViewStyle 20 | 21 | ### date 22 | 23 | Initial date in 'yyyy-MM-dd' format 24 | string 25 | 26 | ### onDateChanged 27 | 28 | Handler which gets executed when the date changes 29 | (date: string, updateSource: UpdateSource) => void 30 | 31 | ### onMonthChange 32 | 33 | Handler which gets executed when the month changes 34 | (date: DateData, updateSource: UpdateSource) => void 35 | 36 | ### showTodayButton 37 | 38 | Whether to show the today button 39 | boolean 40 | 41 | ### todayButtonStyle 42 | 43 | Today button's style 44 | ViewStyle 45 | 46 | ### todayBottomMargin 47 | 48 | Today button's top position 49 | number 50 | 51 | ### disabledOpacity 52 | 53 | The opacity for the disabled today button (0-1) 54 | number 55 | -------------------------------------------------------------------------------- /docsRNC/docs/Components/ExpandableCalendar.md: -------------------------------------------------------------------------------- 1 | Expandable calendar component 2 | [(code example)](https://github.com/wix/react-native-calendars/blob/master/example/src/screens/expandableCalendarScreen.tsx) 3 | :::info 4 | This component extends **[CalendarList](https://github.com/wix/react-native-calendars/blob/master/src/calendar-list/index.tsx)** props. 5 | ::: 6 | **NOTE: This component should be wrapped with `CalendarProvider` component.** 7 | 8 |
9 | 10 |
11 | 12 | ## API 13 | 14 | ### initialPosition 15 | 16 | The initial position of the calendar ('open' | 'closed') 17 | Positions 18 | 19 | ### onCalendarToggled 20 | 21 | Handler which gets executed when the calendar is opened or closed 22 | (isOpen: boolean) => void 23 | 24 | ### disablePan 25 | 26 | Whether to disable the pan gesture and disable the opening and closing of the calendar (initialPosition will persist) 27 | boolean 28 | 29 | ### hideKnob 30 | 31 | Whether to hide the knob 32 | boolean 33 | 34 | ### leftArrowImageSource 35 | 36 | The source for the left arrow image 37 | ImageSourcePropType 38 | 39 | ### rightArrowImageSource 40 | 41 | The source for the right arrow image 42 | ImageSourcePropType 43 | 44 | ### allowShadow 45 | 46 | Whether to have shadow/elevation for the calendar 47 | boolean 48 | 49 | ### disableWeekScroll 50 | 51 | Whether to disable the week scroll in closed position 52 | boolean 53 | 54 | ### openThreshold 55 | 56 | The threshold for opening the calendar with the pan gesture 57 | number 58 | 59 | ### closeThreshold 60 | 61 | The threshold for closing the calendar with the pan gesture 62 | number 63 | 64 | ### closeOnDayPress 65 | 66 | Whether to close the calendar on day press 67 | boolean 68 | -------------------------------------------------------------------------------- /docsRNC/docs/Components/Timeline.md: -------------------------------------------------------------------------------- 1 | Timeline component 2 | [(code example)](https://github.com/wix/react-native-calendars/blob/master/example/src/screens/timelineCalendarScreen.tsx) 3 | :::info 4 | This component extends **[ScrollView](https://reactnative.dev/docs/scrollview)** props. 5 | ::: 6 | 7 |
8 | 9 |
10 | 11 | ## API 12 | 13 | ### theme 14 | 15 | Specify theme properties to override specific styles for calendar parts 16 | Theme 17 | 18 | ### style 19 | 20 | Specify style for calendar container element 21 | ViewStyle 22 | 23 | ### events 24 | 25 | List of events to render on the timeline 26 | Event[] 27 | 28 | ### start 29 | 30 | The timeline day start time 31 | number 32 | 33 | ### end 34 | 35 | The timeline day end time 36 | number 37 | 38 | ### onEventPress 39 | 40 | Handler which gets executed when event is pressed 41 | (event: Event) => void 42 | 43 | ### onBackgroundLongPress 44 | 45 | Handler which gets executed when background is long pressed. Pass to handle creation of a new event 46 | (timeString: string, time: NewEventTime) => void 47 | 48 | ### onBackgroundLongPressOut 49 | 50 | Handler which gets executed when background's long pressed released. Pass to handle creation of a new event 51 | (timeString: string, time: NewEventTime) => void 52 | 53 | ### renderEvent 54 | 55 | Specify a custom event block 56 | (event: PackedEvent) => JSX.Element 57 | 58 | ### scrollToFirst 59 | 60 | Whether to scroll to the first event 61 | boolean 62 | 63 | ### format24h 64 | 65 | Whether to use 24 hours format for the timeline hours 66 | boolean 67 | -------------------------------------------------------------------------------- /docsRNC/docs/Components/WeekCalendar.md: -------------------------------------------------------------------------------- 1 | Week calendar component. You MUST wrap it inside a CalendarProvider component. 2 | [(code example)](https://github.com/wix/react-native-calendars/blob/master/example/src/screens/expandableCalendarScreen.tsx) 3 | :::info 4 | This component extends **[CalendarList](https://github.com/wix/react-native-calendars/blob/master/src/calendar-list/index.tsx)** props. 5 | ::: 6 | 7 |
8 | 9 |
10 | 11 | ## API 12 | 13 | ### allowShadow 14 | 15 | Whether to have shadow/elevation for the calendar 16 | boolean 17 | 18 | ### hideDayNames 19 | 20 | Whether to hide the names of the week days 21 | boolean 22 | -------------------------------------------------------------------------------- /docsRNC/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docs-rnc", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "docusaurus": "docusaurus", 7 | "start": "docusaurus start", 8 | "build": "docusaurus build", 9 | "swizzle": "docusaurus swizzle", 10 | "deploy": "docusaurus deploy", 11 | "clear": "docusaurus clear", 12 | "serve": "docusaurus serve", 13 | "write-translations": "docusaurus write-translations", 14 | "write-heading-ids": "docusaurus write-heading-ids" 15 | }, 16 | "dependencies": { 17 | "@docusaurus/core": "2.0.0-beta.14", 18 | "@docusaurus/preset-classic": "2.0.0-beta.14", 19 | "@mdx-js/react": "^1.6.21", 20 | "clsx": "^1.1.1", 21 | "prism-react-renderer": "^1.2.1", 22 | "react": "^17.0.1", 23 | "react-dom": "^17.0.1" 24 | }, 25 | "browserslist": { 26 | "production": [ 27 | ">0.5%", 28 | "not dead", 29 | "not op_mini all" 30 | ], 31 | "development": [ 32 | "last 1 chrome version", 33 | "last 1 firefox version", 34 | "last 1 safari version" 35 | ] 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /docsRNC/sidebars.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Creating a sidebar enables you to: 3 | - create an ordered group of docs 4 | - render a sidebar for each doc of that group 5 | - provide next/previous navigation 6 | 7 | The sidebars can be generated from the filesystem, or explicitly defined here. 8 | 9 | Create as many sidebars as you want. 10 | */ 11 | 12 | // @ts-check 13 | 14 | /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ 15 | const sidebars = { 16 | // By default, Docusaurus generates a sidebar from the docs folder structure 17 | tutorialSidebar: [{type: 'autogenerated', dirName: '.'}] 18 | 19 | // But you can create a sidebar manually 20 | /* 21 | tutorialSidebar: [ 22 | { 23 | type: 'category', 24 | label: 'Tutorial', 25 | items: ['hello'], 26 | }, 27 | ], 28 | */ 29 | }; 30 | 31 | module.exports = sidebars; 32 | -------------------------------------------------------------------------------- /docsRNC/src/components/HomepageFeatures.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import clsx from 'clsx'; 3 | import styles from './HomepageFeatures.module.css'; 4 | 5 | const FeatureList = [ 6 | { 7 | title: 'Calendar', 8 | img: require('../../static/img/calendar.png').default, 9 | description: <>Calendar component 10 | }, 11 | { 12 | title: 'Calendar Markings', 13 | img: require('../../static/img/calendar-markings.png').default, 14 | description: <>Marked dates on Calendar's components 15 | }, 16 | { 17 | title: 'Expandable Calendar', 18 | img: require('../../static/img/expandableCalendar.png').default, 19 | description: <>Expandable calendar component 20 | } 21 | // { 22 | // title: 'Timeline Calendar', 23 | // img: require('../../static/img/timeline-calendar.png').default, 24 | // description: (<>Timeline calendar component) 25 | // } 26 | ]; 27 | 28 | function Feature({img, title /* , description */}) { 29 | return ( 30 |
31 |
32 |

{title}

33 | {/*

{description}

*/} 34 |
35 |
36 | {title} 37 |
38 |
39 | ); 40 | } 41 | 42 | export default function HomepageFeatures() { 43 | return ( 44 |
45 |
46 |
47 | {FeatureList.map((props, idx) => ( 48 | 49 | ))} 50 |
51 |
52 |
53 | ); 54 | } 55 | -------------------------------------------------------------------------------- /docsRNC/src/components/HomepageFeatures.module.css: -------------------------------------------------------------------------------- 1 | .features { 2 | display: flex; 3 | align-items: center; 4 | padding: 2rem 0; 5 | width: 100%; 6 | } 7 | 8 | .featureSvg { 9 | height: 80%; 10 | width: 80%; 11 | } 12 | -------------------------------------------------------------------------------- /docsRNC/src/css/custom.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Any CSS included here will be global. The classic template 3 | * bundles Infima by default. Infima is a CSS framework designed to 4 | * work well for content-centric websites. 5 | */ 6 | 7 | /* You can override the default Infima variables here. */ 8 | :root { 9 | --ifm-color-primary: #ffb968; 10 | --ifm-color-primary-dark: #ff9416; 11 | --ifm-color-primary-darker: #ff9416; 12 | --ifm-color-primary-darkest: #ff9416; 13 | --ifm-color-primary-light: #ffdaae; 14 | --ifm-color-primary-lighter: #ffdaae; 15 | --ifm-color-primary-lightest: #ffdaae; 16 | --ifm-code-font-size: 95%; 17 | } 18 | 19 | .docusaurus-highlight-code-line { 20 | background-color: rgba(0, 0, 0, 0.1); 21 | display: block; 22 | margin: 0 calc(-1 * var(--ifm-pre-padding)); 23 | padding: 0 var(--ifm-pre-padding); 24 | } 25 | 26 | html[data-theme='dark'] .docusaurus-highlight-code-line { 27 | background-color: rgba(0, 0, 0, 0.3); 28 | } 29 | -------------------------------------------------------------------------------- /docsRNC/src/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import clsx from 'clsx'; 3 | import Layout from '@theme/Layout'; 4 | // import Link from '@docusaurus/Link'; 5 | import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; 6 | import styles from './index.module.css'; 7 | import HomepageFeatures from '../components/HomepageFeatures'; 8 | 9 | function HomepageHeader() { 10 | const {siteConfig} = useDocusaurusContext(); 11 | return ( 12 |
13 |
14 |

{siteConfig.title}

15 |

{siteConfig.tagline}

16 |
17 |
18 | ); 19 | } 20 | 21 | export default function Home() { 22 | return ( 23 | 24 | 25 |
26 | 27 |
28 |
29 | ); 30 | } 31 | -------------------------------------------------------------------------------- /docsRNC/src/pages/index.module.css: -------------------------------------------------------------------------------- 1 | /** 2 | * CSS files with the .module.css suffix will be treated as CSS modules 3 | * and scoped locally. 4 | */ 5 | 6 | .heroBanner { 7 | padding: 6rem 0; 8 | text-align: center; 9 | position: relative; 10 | overflow: hidden; 11 | height: 180px; 12 | } 13 | 14 | @media screen and (max-width: 966px) { 15 | .heroBanner { 16 | padding: 2rem; 17 | } 18 | } 19 | 20 | .buttons { 21 | display: flex; 22 | align-items: center; 23 | justify-content: center; 24 | } 25 | -------------------------------------------------------------------------------- /docsRNC/src/pages/markdown-page.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Markdown page example 3 | --- 4 | 5 | # Markdown page example 6 | 7 | You don't need React to write simple standalone pages. 8 | -------------------------------------------------------------------------------- /docsRNC/static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/docsRNC/static/.nojekyll -------------------------------------------------------------------------------- /docsRNC/static/img/calendar-markings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/docsRNC/static/img/calendar-markings.png -------------------------------------------------------------------------------- /docsRNC/static/img/calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/docsRNC/static/img/calendar.png -------------------------------------------------------------------------------- /docsRNC/static/img/expandableCalendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/docsRNC/static/img/expandableCalendar.png -------------------------------------------------------------------------------- /docsRNC/static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/docsRNC/static/img/logo.png -------------------------------------------------------------------------------- /docsRNC/static/img/timeline-calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/docsRNC/static/img/timeline-calendar.png -------------------------------------------------------------------------------- /docsRNC/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // This file is not used in compilation. It is here just for a nice editor experience. 3 | "extends": "@tsconfig/docusaurus/tsconfig.json", 4 | "compilerOptions": { 5 | "baseUrl": "." 6 | } 7 | } -------------------------------------------------------------------------------- /e2e/agenda.spec.js: -------------------------------------------------------------------------------- 1 | import testIDs from '../example/src/testIDs'; 2 | 3 | const {SELECT_DATE_SLOT, RESERVATION_DATE} = require('../src/testIDs'); 4 | 5 | describe('Agenda', () => { 6 | beforeEach(async () => { 7 | await device.reloadReactNative(); 8 | await element(by.id(testIDs.menu.AGENDA)).tap(); 9 | }); 10 | 11 | it('should move to previous month', async () => { 12 | await element(by.id(`${SELECT_DATE_SLOT}-2017-05-17`)).tap(); 13 | await element(by.id(`${SELECT_DATE_SLOT}-2017-05-18`)).tap(); 14 | await element(by.id(`${SELECT_DATE_SLOT}-2017-05-19`)).tap(); 15 | await element(by.id(`${SELECT_DATE_SLOT}-2017-05-20`)).tap(); 16 | 17 | await expect(element(by.text('20').withAncestor(by.id(RESERVATION_DATE)))).toBeVisible(); 18 | }); 19 | 20 | it('should tap agenda item and see an alert', async () => { 21 | await element(by.text('Item for 2017-05-17 #0').withAncestor(by.id(testIDs.agenda.ITEM))).tap(); 22 | await expect(element(by.text('OK'))).toBeVisible(); 23 | 24 | await element(by.text('OK')).tap(); 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /e2e/app.spec.js: -------------------------------------------------------------------------------- 1 | import testIDs from '../example/src/testIDs'; 2 | 3 | describe('Example app', () => { 4 | beforeEach(async () => { 5 | await device.reloadReactNative(); 6 | }); 7 | 8 | it('should have menu screen', async () => { 9 | await expect(element(by.id(testIDs.menu.CONTAINER))).toBeVisible(); 10 | }); 11 | 12 | it('should open calendars screen', async () => { 13 | await element(by.id(testIDs.menu.CALENDARS)).tap(); 14 | await expect(element(by.id(testIDs.calendars.CONTAINER))).toBeVisible(); 15 | }); 16 | 17 | it('should open calendar list screen', async () => { 18 | await element(by.id(testIDs.menu.CALENDAR_LIST)).tap(); 19 | await expect(element(by.id(testIDs.calendarList.CONTAINER))).toBeVisible(); 20 | }); 21 | 22 | it('should open horizontal calendar list screen', async () => { 23 | await element(by.id(testIDs.menu.HORIZONTAL_LIST)).tap(); 24 | await expect(element(by.id(testIDs.horizontalList.CONTAINER))).toBeVisible(); 25 | }); 26 | 27 | it('should open agenda screen', async () => { 28 | await element(by.id(testIDs.menu.AGENDA)).tap(); 29 | await expect(element(by.id(testIDs.agenda.CONTAINER))).toBeVisible(); 30 | }); 31 | 32 | it('should open expandable calendar screen', async () => { 33 | await element(by.id(testIDs.menu.EXPANDABLE_CALENDAR)).tap(); 34 | // await expect(element(by.id(testIDs.expandableCalendar.CONTAINER))).toBeVisible(); 35 | }); 36 | 37 | it('should open week calendar screen', async () => { 38 | await element(by.id(testIDs.menu.WEEK_CALENDAR)).tap(); 39 | await expect(element(by.id(testIDs.weekCalendar.CONTAINER))).toBeVisible(); 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /e2e/calendars.spec.js: -------------------------------------------------------------------------------- 1 | import testIDs from '../example/src/testIDs'; 2 | 3 | const {HEADER_MONTH_NAME, CHANGE_MONTH_LEFT_ARROW, CHANGE_MONTH_RIGHT_ARROW} = require('../src/testIDs'); 4 | 5 | describe('Calendars', () => { 6 | const FIRST_CALENDAR = testIDs.calendars.FIRST; 7 | 8 | beforeEach(async () => { 9 | await device.reloadReactNative(); 10 | await element(by.id(testIDs.menu.CALENDARS)).tap(); 11 | }); 12 | 13 | it('should scroll calendars to the bottom', async () => { 14 | await element(by.id(testIDs.calendars.CONTAINER)).scrollTo('bottom'); 15 | await expect(element(by.id(testIDs.calendars.LAST))).toBeVisible(); 16 | }); 17 | 18 | it('should move to previous month', async () => { 19 | await expect(element(by.id(`${HEADER_MONTH_NAME}-${FIRST_CALENDAR}`))).toHaveText('February 2020'); 20 | 21 | await element(by.id(`${CHANGE_MONTH_LEFT_ARROW}-${FIRST_CALENDAR}`)).tap(); 22 | await expect(element(by.id(`${HEADER_MONTH_NAME}-${FIRST_CALENDAR}`))).toHaveText('January 2020'); 23 | }); 24 | 25 | it('should move to next month twice', async () => { 26 | await expect(element(by.id(`${HEADER_MONTH_NAME}-${FIRST_CALENDAR}`))).toHaveText('February 2020'); 27 | 28 | await element(by.id(`${CHANGE_MONTH_RIGHT_ARROW}-${FIRST_CALENDAR}`)).tap(); 29 | await element(by.id(`${CHANGE_MONTH_RIGHT_ARROW}-${FIRST_CALENDAR}`)).tap(); 30 | await expect(element(by.id(`${HEADER_MONTH_NAME}-${FIRST_CALENDAR}`))).toHaveText('April 2020'); 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /e2e/calendarsList.spec.js: -------------------------------------------------------------------------------- 1 | import testIDs from '../example/src/testIDs'; 2 | 3 | describe('Calendars List', () => { 4 | const FIRST_CALENDAR = `${testIDs.calendarList.CONTAINER}_1528588800000`; 5 | const LAST_CALENDAR = `${testIDs.calendarList.CONTAINER}_1654819200000`; 6 | 7 | beforeEach(async () => { 8 | await device.reloadReactNative(); 9 | await element(by.id(testIDs.menu.CALENDAR_LIST)).tap(); 10 | }); 11 | 12 | it('should scroll calendars to the top', async () => { 13 | await element(by.id(testIDs.calendarList.CONTAINER)).scrollTo('top'); 14 | await expect(element(by.id(FIRST_CALENDAR))).toBeVisible(); 15 | await expect(element(by.id(FIRST_CALENDAR))).toHaveLabel('June 2018'); 16 | }); 17 | 18 | it('should scroll calendars to the bottom', async () => { 19 | await element(by.id(testIDs.calendarList.CONTAINER)).scrollTo('bottom'); 20 | await expect(element(by.id(LAST_CALENDAR))).toBeVisible(); 21 | await expect(element(by.id(LAST_CALENDAR))).toHaveLabel('June 2022'); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /e2e/expandableCalendar.spec.js: -------------------------------------------------------------------------------- 1 | import testIDs from '../example/src/testIDs'; 2 | 3 | const {CHANGE_MONTH_RIGHT_ARROW, CHANGE_MONTH_LEFT_ARROW, STATIC_HEADER} = require('../src/testIDs'); 4 | 5 | describe('Expandable Calendar', () => { 6 | beforeEach(async () => { 7 | await device.reloadReactNative(); 8 | await element(by.id(testIDs.menu.EXPANDABLE_CALENDAR)).tap(); 9 | }); 10 | 11 | it('sanity', async () => { 12 | const knobTestID = `${testIDs.expandableCalendar.CONTAINER}-knob`; 13 | 14 | await waitFor(element(by.id(knobTestID))).toExist().withTimeout(2000); 15 | await element(by.id(knobTestID)).swipe('down', 'fast'); 16 | 17 | await element(by.text('Pilates ABC').withAncestor(by.id(testIDs.agenda.ITEM))).tap(); 18 | await expect(element(by.text('OK'))).toBeVisible(); 19 | await element(by.text('OK')).tap(); 20 | 21 | await element(by.id(`${CHANGE_MONTH_RIGHT_ARROW}-${STATIC_HEADER}`)).tap(); 22 | await element(by.id(`${CHANGE_MONTH_LEFT_ARROW}-${STATIC_HEADER}`)).tap(); 23 | 24 | await element(by.id(knobTestID)).swipe('up', 'fast'); 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /e2e/horizontalList.spec.js: -------------------------------------------------------------------------------- 1 | import testIDs from '../example/src/testIDs'; 2 | 3 | const {HEADER_MONTH_NAME} = require('../src/testIDs'); 4 | 5 | describe('Horizontal Calendar List', () => { 6 | const FIRST_CALENDAR = `${testIDs.horizontalList.CONTAINER}_1526428800000`; 7 | const LAST_CALENDAR = `${testIDs.horizontalList.CONTAINER}_1652659200000`; 8 | 9 | beforeEach(async () => { 10 | await device.reloadReactNative(); 11 | await element(by.id(testIDs.menu.HORIZONTAL_LIST)).tap(); 12 | }); 13 | 14 | it('should scroll calendars to the top', async () => { 15 | await element(by.id(testIDs.horizontalList.CONTAINER)).scrollTo('left'); 16 | await expect(element(by.id(`${HEADER_MONTH_NAME}-${FIRST_CALENDAR}`))).toBeVisible(); 17 | await expect(element(by.id(`${HEADER_MONTH_NAME}-${FIRST_CALENDAR}`))).toHaveText('May 2018'); 18 | }); 19 | 20 | it('should scroll calendars to the bottom', async () => { 21 | await element(by.id(testIDs.horizontalList.CONTAINER)).scrollTo('right'); 22 | await expect(element(by.id(`${HEADER_MONTH_NAME}-${LAST_CALENDAR}`))).toBeVisible(); 23 | await expect(element(by.id(`${HEADER_MONTH_NAME}-${LAST_CALENDAR}`))).toHaveText('May 2022'); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /e2e/init.js: -------------------------------------------------------------------------------- 1 | const detox = require('detox'); 2 | const config = require('../package.json').detox; 3 | const adapter = require('detox/runners/mocha/adapter'); 4 | 5 | before(async () => { 6 | await detox.init(config); 7 | await device.launchApp(); 8 | }); 9 | 10 | beforeEach(async function () { 11 | await adapter.beforeEach(this); 12 | }); 13 | 14 | afterEach(async function () { 15 | await adapter.afterEach(this); 16 | }); 17 | 18 | after(async () => { 19 | await detox.cleanup(); 20 | }); 21 | -------------------------------------------------------------------------------- /e2e/mocha.opts: -------------------------------------------------------------------------------- 1 | --recursive --timeout 120000 --bail --file e2e/init.js 2 | -------------------------------------------------------------------------------- /e2e/week-calendar.spec.js: -------------------------------------------------------------------------------- 1 | // import testIDs from '../example/src/testIDs'; 2 | 3 | // describe('Week Calendar', () => { 4 | // beforeEach(async () => { 5 | // await device.reloadReactNative(); 6 | // await element(by.id(testIDs.menu.WEEK_CALENDAR)).tap(); 7 | // }); 8 | 9 | // it('sanity', async () => { 10 | // await expect(element(by.id(testIDs.weekCalendar.CONTAINER))).toBeVisible(); 11 | // await expect(element(by.text('First Yoga').withAncestor(by.id(testIDs.agenda.ITEM)))).toBeVisible(); 12 | // await element(by.id(testIDs.weekCalendar.CONTAINER)).swipe('left', 'fast'); 13 | // await element(by.id(testIDs.weekCalendar.CONTAINER)).swipe('left', 'fast'); 14 | // await element(by.id(testIDs.weekCalendar.CONTAINER)).swipe('left', 'fast'); 15 | // await expect(element(by.text('Middle Yoga').withAncestor(by.id(testIDs.agenda.ITEM)))).toBeVisible(); 16 | // await element(by.id(testIDs.weekCalendar.CONTAINER)).swipe('right', 'fast'); 17 | // await element(by.id(testIDs.weekCalendar.CONTAINER)).swipe('right', 'fast'); 18 | // await element(by.id(testIDs.weekCalendar.CONTAINER)).swipe('right', 'fast'); 19 | // await expect(element(by.text('First Yoga').withAncestor(by.id(testIDs.agenda.ITEM)))).toBeVisible(); 20 | // }); 21 | // }); 22 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | 33 | # node.js 34 | # 35 | node_modules/ 36 | npm-debug.log 37 | yarn-error.log 38 | 39 | # BUCK 40 | buck-out/ 41 | \.buckd/ 42 | *.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 50 | 51 | fastlane/report.xml 52 | fastlane/Preview.html 53 | fastlane/screenshots 54 | -------------------------------------------------------------------------------- /example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CalendarsExample", 3 | "displayName": "CalendarsExample" 4 | } 5 | -------------------------------------------------------------------------------- /example/src/app.tsx: -------------------------------------------------------------------------------- 1 | import './wdyr'; // <--- must be first import 2 | import React from 'react'; 3 | import {AppRegistry} from 'react-native'; 4 | //@ts-expect-error 5 | import {LocaleConfig} from 'react-native-calendars'; 6 | import {name as appName} from '../app.json'; 7 | import MenuScreen from './screens/menuScreen'; 8 | 9 | /** Locale */ 10 | 11 | LocaleConfig.locales['en'] = { 12 | formatAccessibilityLabel: "dddd d 'of' MMMM 'of' yyyy", 13 | monthNames: [ 14 | 'January', 15 | 'February', 16 | 'March', 17 | 'April', 18 | 'May', 19 | 'June', 20 | 'July', 21 | 'August', 22 | 'September', 23 | 'October', 24 | 'November', 25 | 'December' 26 | ], 27 | monthNamesShort: ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'], 28 | dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], 29 | dayNamesShort: ['S', 'M', 'T', 'W', 'T', 'F', 'S'] 30 | // numbers: ['٠', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩'] // <--- number localization example 31 | }; 32 | LocaleConfig.locales['fr'] = { 33 | monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin','Juillet','Août','Septembre','Octobre','Novembre','Décembre'], 34 | monthNamesShort: ['Janv.','Févr.','Mars','Avril','Mai','Juin','Juil.','Août','Sept.','Oct.','Nov.','Déc.'], 35 | dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'], 36 | dayNamesShort: ['Dim.','Lun.','Mar.','Mer.','Jeu.','Ven.','Sam.'], 37 | today: 'Aujourd\'hui' 38 | }; 39 | LocaleConfig.locales['he'] = { 40 | formatAccessibilityLabel: "dddd d 'of' MMMM 'of' yyyy", 41 | monthNames: [ 42 | 'ינואר', 43 | 'פברואר', 44 | 'מרץ', 45 | 'אפריל', 46 | 'מאי', 47 | 'יוני', 48 | 'יולי', 49 | 'אוגוסט', 50 | 'ספטמבר', 51 | 'אוקטובר', 52 | 'נובמבר', 53 | 'דצמבר' 54 | ], 55 | monthNamesShort: ['ינו', 'פבר', 'מרץ', 'אפר', 'מאי', 'יונ', 'יול', 'אוג', 'ספט', 'אוק', 'נוב', 'דצמ'], 56 | dayNames: ['ראון', 'שני', 'שלישי', 'קביעי', 'חמישי', 'שישי', 'שבת'], 57 | dayNamesShort: ['א', 'ב', 'ג', 'ד', 'ה', 'ו', 'ש'] 58 | }; 59 | LocaleConfig.defaultLocale = 'en'; 60 | 61 | export default function App() { 62 | return ; 63 | } 64 | AppRegistry.registerComponent(appName, () => App); 65 | -------------------------------------------------------------------------------- /example/src/img/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/example/src/img/close.png -------------------------------------------------------------------------------- /example/src/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/example/src/img/logo.png -------------------------------------------------------------------------------- /example/src/img/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/example/src/img/next.png -------------------------------------------------------------------------------- /example/src/img/next@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/example/src/img/next@2x.png -------------------------------------------------------------------------------- /example/src/img/next@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/example/src/img/next@3x.png -------------------------------------------------------------------------------- /example/src/img/previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/example/src/img/previous.png -------------------------------------------------------------------------------- /example/src/img/previous@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/example/src/img/previous@2x.png -------------------------------------------------------------------------------- /example/src/img/previous@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/example/src/img/previous@3x.png -------------------------------------------------------------------------------- /example/src/img/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix/react-native-calendars/848a8f40e01d0a671b567e23602a82961220a6dd/example/src/img/settings.png -------------------------------------------------------------------------------- /example/src/mocks/AgendaItem.tsx: -------------------------------------------------------------------------------- 1 | import isEmpty from 'lodash/isEmpty'; 2 | import React, {useCallback} from 'react'; 3 | import {StyleSheet, Alert, View, Text, TouchableOpacity, Button} from 'react-native'; 4 | import testIDs from '../testIDs'; 5 | 6 | interface ItemProps { 7 | item: any; 8 | } 9 | 10 | const AgendaItem = (props: ItemProps) => { 11 | const {item} = props; 12 | 13 | const buttonPressed = useCallback(() => { 14 | Alert.alert('Show me more'); 15 | }, []); 16 | 17 | const itemPressed = useCallback(() => { 18 | Alert.alert(item.title); 19 | }, [item]); 20 | 21 | if (isEmpty(item)) { 22 | return ( 23 | 24 | No Events Planned Today 25 | 26 | ); 27 | } 28 | 29 | return ( 30 | 31 | 32 | {item.hour} 33 | {item.duration} 34 | 35 | {item.title} 36 | 37 |