# react-native-calendar-vaia

> Vaia custom calender component.

Latest version **1.0.5** (published 2021-06-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-calendar-vaia
pnpm add react-native-calendar-vaia
yarn add react-native-calendar-vaia
bun add react-native-calendar-vaia
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2021-06-22 |
| First published | 2021-06-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 25.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Joe Schnetzler |
| Maintainers | schnetzlerjoe |
| Keywords | react-native, react, calendar, range, picker, javascript |

## Links

- npm: https://www.npmjs.com/package/react-native-calendar-vaia
- Repository: https://github.com/schnetzlerjoe/react-native-calendar-range-vaia
- Homepage: https://github.com/huurray/react-native-calendar-vaia#readme
- Issues: https://github.com/huurray/react-native-calendar-vaia/issues
- npm.io page: https://npm.io/package/react-native-calendar-vaia

## Dependencies (4)

- [react](https://npm.io/package/react.md) *
- [moment](https://npm.io/package/moment.md) ^2.29.1
- [package.json](https://npm.io/package/package.json.md) ^2.0.1
- [react-native](https://npm.io/package/react-native.md) ^0.64.2

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2021-06-22
- 1.0.4 — 2021-06-22
- 1.0.3 — 2021-06-22
- 1.0.2 — 2021-06-22
- 1.0.1 — 2021-06-04
- 1.0.0 — 2021-06-04

## README

# :point_up_2: react-native-calendar-range-picker

![platforms](https://img.shields.io/badge/platforms-Android%20|%20iOS-brightgreen.svg)
[![npm](https://img.shields.io/npm/v/react-native-calendar-range-picker.svg)](https://www.npmjs.com/package/react-native-calendar-range-picker)
[![npm](https://img.shields.io/npm/dm/react-native-calendar-range-picker.svg)](https://www.npmjs.com/package/react-native-calendar-range-picker)

A Simple react native calendar picker using Hooks.

![demo-play](https://user-images.githubusercontent.com/41982439/76744452-9da90f80-67b7-11ea-9aca-1590ebbf3d11.gif)

## Install

```
yarn add react-native-calendar-range-picker
```

or

```
npm install react-native-calendar-range-picker --save
```

## Usage

### Select date range

```jsx
import Calendar from "react-native-calendar-range-picker";

<View style={{ flex: 1 }}>
  <Calendar
    startDate="2020-05-05"
    endDate="2020-05-12"
    onChange={({ startDate, endDate }) => console.log({ startDate, endDate })}
  />
</View>;
```

### Select single date

```jsx
<View style={{ height: 600 }}>
  <Calendar
    startDate="2020-05-05"
    singleSelectMode
    onChange={(date) => console.log(date)}
  />
</View>
```

## Props

Common props you may want to specify include:

| Properties            | PropType             | Description                                                                                             |
| --------------------- | -------------------- | ------------------------------------------------------------------------------------------------------- |
| `onChange`            | `func`               | (**Required**) Handler which gets executed on day press including date data.(start, end or single date) |
| `singleSelectMode`    | `boolean`            | Only select single date. (default = false)                                                              |
| `pastYearRange`       | `number`             | Amount of months allowed to scroll to the past. (default = 1)                                           |
| `futureYearRange`     | `number`             | Amount of months allowed to scroll to the future. (default = 2)                                         |
| `locale`              | `object`             | Can be localized by adding custom locales to locale object.                                             |
| `startDate`           | `string(YYYY-MM-DD)` | Initially visible start date.                                                                           |
| `endDate`             | `string(YYYY-MM-DD)` | Initially visible end date.                                                                             |
| `initialNumToRender`  | `number`             | FlatList initialNumToRender prop.(to protect slow initial render)(default = 7)                          |
| `flatListProps`       | `FlatList Props`     | FlatList all props.                                                                                     |
| `isMonthFirst`        | `boolean`            | Switch year and month order. (2021 April -> April 2021)                                                 |
| `disabledBeforeToday` | `boolean`            | Disable select day before today.                                                                        |
| `style`               | `object`             | Customize style.                                                                                        |

### Locale

```jsx
const CUSTOM_LOCALE = {
    monthNames: [
    'January',
    'February',
    'March',
    'April',
    'May',
    'June',
    'July',
    'August',
    'September',
    'October',
    'November',
    'December',
    ],
    dayNames: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
    today: 'Today',
    year: '', // letter behind year number -> 2020{year}
  }

<Calendar
  locale={CUSTOM_LOCALE}
  ...
/>;
```

### Customize Style

```jsx
<Calendar
  style={{
    container: {},
    monthContainer: {},
    weekContainer:{},
    monthNameText: {},
    dayNameText: {},
    dayText: {},
    dayTextColor: '#f7f7f7',
    holidayColor: 'rgba(0,0,0,0.5)',
    todayColor: 'blue',
    disabledTextColor: '#Hex',
    selectedDayTextColor: '#Hex',
    selectedDayBackgroundColor: '#Hex',
    selectedBetweenDayTextColor: '#Hex',
    selectedBetweenDayBackgroundTextColor: '#Hex',
  }}
  ...
/>;
```

## License

MIT

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