Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johan-dutoit/react-native-week-selector
Customisable week selector for react native
https://github.com/johan-dutoit/react-native-week-selector
react-native selector week-view
Last synced: 19 days ago
JSON representation
Customisable week selector for react native
- Host: GitHub
- URL: https://github.com/johan-dutoit/react-native-week-selector
- Owner: Johan-dutoit
- License: mit
- Created: 2018-09-25T09:43:09.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-02T12:30:16.000Z (almost 2 years ago)
- Last Synced: 2024-10-14T10:17:27.266Z (about 1 month ago)
- Topics: react-native, selector, week-view
- Language: JavaScript
- Homepage:
- Size: 690 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-native-week-selector
A simple and customisable week selector
![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)
[![NPM Version](https://img.shields.io/npm/v/react-native-week-selector.svg?style=flat)](https://www.npmjs.com/package/react-native-week-selector)
[![NPM Downloads](https://img.shields.io/npm/dm/react-native-week-selector.svg?style=flat)](https://www.npmjs.com/package/react-native-week-selector)## Quick Access
- Installation
- Preview
- Usage
- Properties
- Contributing## Installation
Install the module with:
```
npm install react-native-week-selector --save
```## Preview
Try it on [Expo](https://snack.expo.io/@johan-dev/react-native-week-selector)
## Usage
Simply import the component
```js
import WeekSelector from 'react-native-week-selector';
```Then use as follows
```js
```
###### Top
## Properties
| Prop | Description | Default |
| ---------------------------- | -------------------------------------------------------------- | ------------------ |
| **`date`** | Set initial date | `new Date()` |
| **`containerStyle`** | Additional style for the container | `undefined` |
| **`selectorContainerStyle`** | Additional style for the selector containers | `undefined` |
| **`dateContainerStyle`** | Additional style for the date container | `undefined` |
| **`textStyle`** | Additional style for the date text | `undefined` |
| **`whitelistRange`** | 2 values indicating the earliest/latest the user can change to | `[]` |
| **`onWeekChanged`** | Event triggered when changing week | `undefined` |
| **`weekStartsOn`** | Which day does the week start on | `1` (Monday) |
| **`renderPreviousSelector`** | Override the default previous selector | `undefined` |
| **`renderNextSelector`** | Override the default next selector | `undefined` |
| **`dayFormat`** | Display format for the day | `DD` (05) |
| **`monthFormat`** | Display format for the month | `MMMM` (September) |###### Top
## Contributing
Feel free to do pull requests if a certain feature you want is missing. We accept all PR's that are enhancements to the project.
###### Top