{"id":4213,"url":"https://github.com/chymtt/ReactNativeCalendarAndroid","last_synced_at":"2025-08-04T00:32:38.026Z","repository":{"id":57335905,"uuid":"47132035","full_name":"chymtt/ReactNativeCalendarAndroid","owner":"chymtt","description":"A simple material-themed calendar for react native android","archived":false,"fork":false,"pushed_at":"2016-10-23T03:40:52.000Z","size":18,"stargazers_count":42,"open_issues_count":7,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-08T08:48:13.355Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chymtt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-30T16:39:52.000Z","updated_at":"2023-03-09T02:20:57.000Z","dependencies_parsed_at":"2022-09-15T15:11:22.006Z","dependency_job_id":null,"html_url":"https://github.com/chymtt/ReactNativeCalendarAndroid","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chymtt%2FReactNativeCalendarAndroid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chymtt%2FReactNativeCalendarAndroid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chymtt%2FReactNativeCalendarAndroid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chymtt%2FReactNativeCalendarAndroid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chymtt","download_url":"https://codeload.github.com/chymtt/ReactNativeCalendarAndroid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228576898,"owners_count":17939645,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:17:04.686Z","updated_at":"2024-12-07T07:31:32.889Z","avatar_url":"https://github.com/chymtt.png","language":"Java","readme":"# react-native-calendar-android\n\nA simple material-themed calendar for react native android\n\n\u003cimg src=\"https://dl.dropboxusercontent.com/u/20911725/Screenshots/Screencast-2015.12.01-00.32.gif\" alt=\"Demo Screen Capture\" width=\"300px\" /\u003e\n\n## Installation Android\n1. `npm install --save react-native-calendar-android`\n\n_Note_: Since react-native-calendar-android@0.0.3, you should use react-native@0.19.0 and above\n\n2. In `android/settings.gradle`\n\n    ```gradle\n    ...\n    include ':ReactNativeCalendarAndroid', ':app'\n    project(':ReactNativeCalendarAndroid').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-calendar-android/android')\n    ```\n\n3. In `android/app/build.gradle`\n\n    ```gradle\n    ...\n    dependencies {\n        ...\n        compile project(':ReactNativeCalendarAndroid')\n    }\n    ```\n\n4. Register module (in MainActivity.java)\n\n    4.1. With RN \u003c 0.19.0\n\n        ```java\n        import com.chymtt.reactnativecalendar.CalendarPackage; // \u003c----- import\n\n        public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler {\n          ......\n\n          @Override\n          protected void onCreate(Bundle savedInstanceState) {\n            super.onCreate(savedInstanceState);\n            mReactRootView = new ReactRootView(this);\n\n            mReactInstanceManager = ReactInstanceManager.builder()\n              .setApplication(getApplication())\n              .setBundleAssetName(\"index.android.bundle\")\n              .setJSMainModuleName(\"index.android\")\n              .addPackage(new MainReactPackage())\n              .addPackage(new CalendarPackage())              // \u003c------ add here\n              .setUseDeveloperSupport(BuildConfig.DEBUG)\n              .setInitialLifecycleState(LifecycleState.RESUMED)\n              .build();\n\n            mReactRootView.startReactApplication(mReactInstanceManager, \"ExampleRN\", null);\n\n            setContentView(mReactRootView);\n          }\n          ......\n        }\n        ```\n\n    4.2. With RN \u003e= 0.19.0\n\n        ```java\n        import com.chymtt.reactnativecalendar.CalendarPackage; // \u003c----- import\n\n        public class MainActivity extends ReactActivity {\n            ...\n\n            @Override\n            protected List\u003cReactPackage\u003e getPackages() {\n              return Arrays.\u003cReactPackage\u003easList(\n                new MainReactPackage(),\n                new CalendarPackage() // \u003c------ add here\n              );\n            }\n        }\n        ```\n\n## Usage\n\n```js\n\nvar Calendar = require('react-native-calendar-android');\n...\n\n  render() {\n    return (\n      \u003cCalendar\n          width={300}\n          topbarVisible={true}\n          arrowColor=\"#dafacd\"\n          firstDayOfWeek=\"monday\"\n          showDate=\"all\"\n          currentDate={[ \"2016/12/01\" ]}\n          selectionMode=\"multiple\"\n          selectionColor=\"#dadafc\"\n          selectedDates={[ \"2015/11/20\", \"2015/11/30\", 1448745712382 ]}\n          onDateChange={(data) =\u003e {\n            console.log(data);\n          }} /\u003e\n    );\n  }\n```\n\n## Notes\n\nThe view is a grid with 7 tiles wide and 8 tiles high (with ```topbarVisible=true```), or 7 tiles high (with ```topbarVisible=false```)\n\nThe size of each tile is automatically calculated based on the provided width.\n\n## Props\n\n### int width (required)\n\nProvide the width of the calendar. The height will be calculated based on width and ```topbarVisible```.\n\n### boolean topbarVisible (default = true)\n\nShow/hide the top bar which contains the month's title and arrows to go to previous or next months.\n\n### string arrowColor\n\nA string color in the format #RRGGBB or #AARRGGBB. It changes color of the top bar's arrows accordingly.\n\n### enum firstDayOfWeek (default = 'sunday')\n\nenum [ 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday' ]\n\nSet the first day of the week.\n\n### enum showDate (default = 'current')\n\nenum [ 'all', 'current' ]\n\nIf set to ```current```, only show dates within current month. If set to ```all```, show dates from previous and current months too.\n\n### array currentDate\n\nSet the focus of the calendar. Due to some limitations, you must provide an array with only one element, which is the currentDate. currentDate can be a string in the format ```yyyy/mm/dd``` or a timestamp.\n\n### enum selectionMode (default = 'single')\n\nenum [ 'none', 'single', 'multiple' ]\n\nSet the selection mode.\n\n- none: you cannot select date\n- single: you can only select one date at a time\n- multiple: you can select multiple dates\n\n### string selectionColor\n\nSet the color of the selection circle. Should be a color in the format #RRGGBB or #AARRGGBB.\n\n### array selectedDates\n\nAn array of dates in the format ```yyyy/mm/dd``` or timestamp. Set the selected dates on the calendar.\n\n## Event\n\n### onDateChange(data)\n\nCalled when user select/deselect a date. The returned data is { date: 'yyyy/mm/dd', selected: boolean }\n\n## Questions or suggestions?\n\nFeel free to [open an issue](https://github.com/chymtt/ReactNativeCalendarAndroid/issues)\n[Pull requests](https://github.com/chymtt/ReactNativeCalendarAndroid/pulls) are also welcome\n\n## Credit\n\nBig thanks to @prolificinteractive for their awesome [Material Calendar View](https://github.com/prolificinteractive/material-calendarview)\n","funding_links":[],"categories":["Components","Others"],"sub_categories":["UI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchymtt%2FReactNativeCalendarAndroid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchymtt%2FReactNativeCalendarAndroid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchymtt%2FReactNativeCalendarAndroid/lists"}