# react-native-weekday-picker

> A weekday picker for react-native and expo. Lets users pick days of the week, in a repeating alarm clock fashion

Latest version **0.0.1** (published 2019-07-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-weekday-picker
pnpm add react-native-weekday-picker
yarn add react-native-weekday-picker
bun add react-native-weekday-picker
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2019-07-05 |
| First published | 2019-07-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | kuzdogan |
| Maintainers | kuzdogan |
| Keywords | react-native, weekday, picker, daypicker, repeat, day, alarm |

## Links

- npm: https://www.npmjs.com/package/react-native-weekday-picker
- Repository: https://github.com/kuzdogan/react-native-weekday-picker
- Homepage: https://github.com/kuzdogan/react-native-weekday-picker#readme
- Issues: https://github.com/kuzdogan/react-native-weekday-picker/issues
- npm.io page: https://npm.io/package/react-native-weekday-picker

## Recent versions

- 0.0.1 (latest) — 2019-07-05

## README

# react-native-weekday-picker
A weekday picker for React Native and Expo. Lets users pick days of the week as in a repeating alarm clock. 

## Installation
```
npm install react-native-weekday-picker
```

## Import
```
import WeekdayPicker from "react-native-weekday-picker"
```

## Example Usage
Requires a days object which is a mapping from weekdays to a `bool` value represented by a `0` or a `1`

```
let days = { 1:1, 2:1 , 3:1 , 4:1 , 5:1, 6:0, 0:0 }
<WeekdayPicker
  days={days}
  onChange={this.handleChange}
  style={styles.picker}
  dayStyle={styles.day}
/>
```
## Properties
| Prop     | Type     | Default                                  | Required | Description                                                                                              | Example                                               |
|----------|----------|------------------------------------------|----------|----------------------------------------------------------------------------------------------------------|-------------------------------------------------------|
| days     | Object   | `{ 0:0, 1:0, 2:1, 3:0,  4:1, 5:0, 6:0 }` |          | A mapping of days from weekdays to `0` and `1` as bool values. 0: Sunday 1: Monday ... 6: Saturday       |                                                       |
| onChange | function | null                                     |          | Function called when a change is made.  Takes a `day` object as a parameter similar to the previous prop | `handleChange = (days) => {     this.setState(days)}` |
| style    | Object   | null                                     |          | `StyleSheet` object for styling the WeekdayPicker wrapper                                                | `{   padding: 30   }`                                 |
| dayStyle | Object   | null                                     |          | `StyleSheet` object for styling the days wrappers                                                        | `{   margin: 5   }`                                   |

## Demo

---
_Source: https://npm.io/package/react-native-weekday-picker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
