Skip to content

Commit 3ff09d1

Browse files
committed
Modify readme
1 parent 12fff2b commit 3ff09d1

File tree

2 files changed

+26
-9
lines changed

2 files changed

+26
-9
lines changed

CHANGELOG.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,29 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## 1.1.0
8+
### Changed
9+
- BREAKING: `date-fns` is now loaded as a peerDependency. You can use this plugin with your own project's `date-fns` version. However if you want to keep using date-fns versions older than 2.0.0, you need to pass the following props to your component. ([See the reason here](https://blog.date-fns.org/post/unicode-tokens-in-date-fns-v2-sreatyki91jg/))
10+
11+
```jsx
12+
<Calendar
13+
dateDisplayFormat='MMM D, YYYY'
14+
monthDisplayFormat='MMM YYYY'
15+
weekdayDisplayFormat='E'
16+
dayDisplayFormat='D'
17+
/>
18+
```
19+
20+
### Added
21+
- `weekStartsOn` prop: You can set the week start day. (Number, 0 - Sunday, 1 - Monday etc.) If not specified, gets the week start day from your locale.
22+
23+
- `weekdayDisplayFormat` and `dayDisplayFormat` props: For being able to use different versions of date-fns
24+
25+
- `startDatePlaceholder` and `endDatePlaceholder` props: You can set different placeholders for Date inputs. If not set, falls back to 'Early' and 'Continuous'.
726

27+
- `fixedHeight` prop: Set this to `true` to prevent height change while selecting different months. Since some months require less than 6 lines to show, by setting this prop, you can force 6 lines for all months.
828

9-
## [Unreleased]
29+
## 1.0.0 beta
1030

1131
### Changed
1232
- BREAKING: `Calendar` and `DateRange` are now totally controlled components with stateless date management.

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
# react-date-range
2-
[![npm](https://img.shields.io/npm/v/react-date-range.svg?style=flat-square)](https://www.npmjs.com/package/react-date-range)
3-
![](https://img.shields.io/bithound/dependencies/github/adphorus/react-date-range.svg?style=flat-square)
2+
[![npm](https://img.shields.io/npm/v/react-date-range)](https://www.npmjs.com/package/react-date-range)
3+
[![npm](https://img.shields.io/npm/l/react-date-range)]()
4+
[![npm](https://img.shields.io/npm/dw/react-date-range)](https://www.npmjs.com/package/react-date-range)
45

5-
[![npm](https://img.shields.io/npm/l/react-date-range.svg?style=flat-square)]()
6-
[![npm](https://img.shields.io/npm/dm/localeval.svg?style=flat-square)](https://www.npmjs.com/package/react-date-range)
7-
8-
> ⚠️ Warning: the current branch represents the new pre-release version. [Legacy version](https://github.com/Adphorus/react-date-range/tree/v0) deprecated.
96

107
A date library agnostic React component for choosing dates and date ranges. Uses [date-fns](http://date-fns.org/) for date operations.
118

@@ -27,12 +24,12 @@ A date library agnostic React component for choosing dates and date ranges. Uses
2724
### Installation
2825

2926
```
30-
yarn add react-date-range@next
27+
yarn add react-date-range
3128
```
3229

3330
If you don't use yarn
3431
```
35-
$ npm install --save react-date-range@next
32+
npm install --save react-date-range
3633
```
3734

3835
## Usage

0 commit comments

Comments
 (0)