# react-widgets-dates

> A date-fns localizer for react-widgets

Latest version **0.0.8** (published 2018-01-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-widgets-dates
pnpm add react-widgets-dates
yarn add react-widgets-dates
bun add react-widgets-dates
```

## 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.8 |
| Published | 2018-01-28 |
| First published | 2018-01-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Eduardo Cancino |
| Maintainers | ecancino |
| Keywords | react-widgets |

## Links

- npm: https://www.npmjs.com/package/react-widgets-dates
- Repository: https://github.com/ecancino/react-widgets-dates
- Homepage: https://github.com/ecancino/react-widgets-dates#readme
- Issues: https://github.com/ecancino/react-widgets-dates/issues
- npm.io page: https://npm.io/package/react-widgets-dates

## Dependencies (3)

- [ramda](https://npm.io/package/ramda.md) 0.25.0
- [date-fns](https://npm.io/package/date-fns.md) 2.0.0-alpha.7
- [react-widgets](https://npm.io/package/react-widgets.md) 4.1.1

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.8 (latest) — 2018-01-28
- 0.0.7 — 2018-01-19
- 0.0.6 — 2018-01-19
- 0.0.5 — 2018-01-16
- 0.0.4 — 2018-01-16
- 0.0.3 — 2018-01-12
- 0.0.2 — 2018-01-12
- 0.0.1 — 2018-01-12

## README

# react-widgets-dates *0.0.5*

> A date-fns localizer for react-widgets


### index.js


#### dateFnsLocalizer(formats) 

Configures localization of [react-widgets](http://jquense.github.io/react-widgets/) by calling `configure.setDateLocalizer`




##### Parameters

| Name | Type | Description |  |
| ---- | ---- | ----------- | -------- |
| formats | `Object`  | Confguration options. | &nbsp; |
| formats.default | `string` `Object` `function`  | the default date display format, generally a "long" format showing both date and time | &nbsp; |
| formats.date | `string` `Object` `function`  | A date only format | &nbsp; |
| formats.time | `string` `Object` `function`  | A time only format | &nbsp; |
| formats.header | `string` `Object` `function`  | The heading of the Calendar month view, contextualizes the current month, e.g. "Jan 2014" | &nbsp; |
| formats.footer | `string` `Object` `function`  | The Calendar footer format, for displaying Today's date | &nbsp; |
| formats.dayOfMonth | `string` `Object` `function`  | The day of the month | &nbsp; |
| formats.month | `string` `Object` `function`  | Month name, used in the Year view of the Calendar | &nbsp; |
| formats.year | `string` `Object` `function`  | year format, used in the Decade view of the Calendar | &nbsp; |
| formats.decade | `string` `Object` `function`  | a decade format, used in the Century view of the Calendar, eg. "2010 - 2019" | &nbsp; |
| formats.century | `string` `Object` `function`  | A century format, used the in the Calendar heading | &nbsp; |
| locales | `Object` | Supported date-fns locales to include in the bundle | &nbsp; |




##### Examples

```javascript
import dateFnsLocalizer, { defaultFormats } from 'react-widgets-dates'
dateFnsLocalizer()
// => Works out of the box with default formats (defaultFormats) and the `en-US` locale
const newFormats = Object.assign(defaultFormats, { default: 'mmm YY' })
dateFnsLocalizer({ formats: newFormats })
// => Uses new configuration

import locales from 'date-fns/locale'
dateFnsLocalizer({ formats: newFormats, locales })
// => Includes all available locales

import enGB from 'date-fns/locale/en-GB'
import de from 'date-fns/locale/de'
dateFnsLocalizer({ locales: { 'en-GB': enGB, 'de': de } })
// => Include only the locales you need to limit the bundled size
```


##### Returns


- `Void`




*Documentation generated with [doxdox](https://github.com/neogeek/doxdox).*

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