Skip to content

Commit cfad0c6

Browse files
committed
Update the version and the READMEs
1 parent d8e88db commit cfad0c6

File tree

3 files changed

+22
-12
lines changed

3 files changed

+22
-12
lines changed

CHANGELOG.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ 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
7+
## 1.0.0
88
### 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/))
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, (minimum version is 2.0.0-alpha.1) 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/), also see [this table](https://date-fns.org/docs/format))
1010

1111
```jsx
1212
<Calendar
@@ -20,12 +20,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2020
### Added
2121
- `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.
2222

23-
- `weekdayDisplayFormat` and `dayDisplayFormat` props: For being able to use different versions of date-fns
23+
- `weekdayDisplayFormat`, `dayDisplayFormat` and `monthDisplayFormat` props: For being able to use different versions of date-fns
2424

2525
- `startDatePlaceholder` and `endDatePlaceholder` props: You can set different placeholders for Date inputs. If not set, falls back to 'Early' and 'Continuous'.
2626

2727
- `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.
2828

29+
30+
### Fixed
31+
-
32+
2933
## 1.0.0 beta
3034

3135
### Changed

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class MyComponent extends Component {
9696

9797
Property | type | Default Value | Description
9898
-------------------------------------|-----------|------------------|-----------------------------------------------------------------
99-
locale | Object | enUS from locale | you can view full list from [here](https://github.com/Adphorus/react-date-range/tree/next/src/locale/index.js). Locales directly exported from [`date-fns/locales`](https://date-fns.org/v2.0.0-alpha.7/docs/I18n#supported-languages).
99+
locale | Object | enUS from locale | you can view full list from [here](https://github.com/Adphorus/react-date-range/tree/next/src/locale/index.js). Locales directly exported from [`date-fns/locales`](https://date-fns.org/docs/I18n#supported-languages).
100100
className | String | | wrapper classname
101101
months | Number | 1 | rendered month count
102102
showSelectionPreview | Boolean | true | show preview on focused/hovered dates
@@ -107,7 +107,7 @@ minDate | Date | | defines mi
107107
maxDate | Date | | defines maximum date. Disabled later dates
108108
direction | String | 'vertical' | direction of calendar months. can be `vertical` or `horizontal`
109109
disabledDates | Date[] | [] | dates that are disabled
110-
scroll | Object | { enabled: false }| infinite scroll behaviour configuration. Check out [Infinite Scroll](#infinite-scrolled-mode) section
110+
scroll | Object | { enabled: false }| infinite scroll behaviour configuration. Check out [Infinite Scroll](#infinite-scrolled-mode) section
111111
showMonthArrow | Boolean | true | show/hide month arrow button
112112
navigatorRenderer | Func | | renderer for focused date navigation area. fn(currentFocusedDate: Date, changeShownDate: func, props: object)
113113
ranges | *Object[] | [] | Defines ranges. array of range object
@@ -121,16 +121,22 @@ onShownDateChange(DateRange,Calendar)| Function | | Callback f
121121
initialFocusedRange(DateRange) | Object | | Initial value for focused range. See `focusedRange` for usage.
122122
focusedRange(DateRange) | Object | | It defines which range and step are focused. Common initial value is `[0, 0]`; first value is index of ranges, second one is which step on date range(startDate or endDate).
123123
onRangeFocusChange(DateRange) | Object | | Callback function for focus changes
124-
preview(DateRange) | Object | | displays a preview range and overwrite DateRange's default preview. Expected shape: `{ startDate: Date, endDate: Date, color: String }`
124+
preview(DateRange) | Object | | displays a preview range and overwrite DateRange's default preview. Expected shape: `{ startDate: Date, endDate: Date, color: String }`
125125
showPreview(DateRange) | bool | true | visibility of preview
126126
editableDateInputs(Calendar) | bool | false | whether dates can be edited in the Calendar's input fields
127127
dragSelectionEnabled(Calendar) | bool | true | whether dates can be selected via drag n drop
128128
onPreviewChange(DateRange) | Object | | Callback function for preview changes
129-
dateDisplayFormat(DateRange) | String | `MMM D, YYYY` | selected range preview formatter. Check out [date-fns's format option](https://date-fns.org/v2.0.0-alpha.7/docs/format)
130-
renderStaticRangeLabel(`DefinedRange`)| Function | | Callback function to be triggered for the static range configurations that have `hasCustomRendering: true` on them. Instead of rendering `staticRange.label`, return value of this callback will be rendered.
131-
staticRanges(`DefinedRange`, `DateRangePicker`) | Array | [default preDefined ranges](https://github.com/Adphorus/react-date-range/blob/master/src/defaultRanges.js) | -
132-
inputRanges(`DefinedRange`, `DateRangePicker`) | Array | [default input ranges](https://github.com/Adphorus/react-date-range/blob/master/src/defaultRanges.js) | -
133-
129+
dateDisplayFormat | String | `MMM d, yyyy` | selected range preview formatter. Check out [date-fns's format option](https://date-fns.org/docs/format)
130+
dayDisplayFormat | String | `d` | selected range preview formatter. Check out [date-fns's format option](https://date-fns.org/docs/format)
131+
weekdayDisplayFormat | String | `E` | selected range preview formatter. Check out [date-fns's format option](https://date-fns.org/docs/format)
132+
monthDisplayFormat | String | `MMM yyyy` | selected range preview formatter. Check out [date-fns's format option](https://date-fns.org/docs/format)
133+
weekStartsOn | Number | | Whether the week start day that comes from the locale will be overriden. Default value comes from your locale, if no local is specified, note that default locale is enUS
134+
startDatePlaceholder | String | `Early` | Start Date Placeholder
135+
endDatePlaceholder | String | `Continuous` | End Date Placeholder
136+
fixedHeight | Boolean | false | Since some months require less than 6 lines to show, by setting this prop, you can force 6 lines for all months.
137+
renderStaticRangeLabel(`DefinedRange`)| Function | | Callback function to be triggered for the static range configurations that have `hasCustomRendering: true` on them. Instead of rendering `staticRange.label`, return value of this callback will be rendered.
138+
staticRanges(`DefinedRange`, `DateRangePicker`) | Array | [default preDefined ranges](https://github.com/Adphorus/react-date-range/blob/master/src/defaultRanges.js) | -
139+
inputRanges(`DefinedRange`, `DateRangePicker`) | Array | [default input ranges](https://github.com/Adphorus/react-date-range/blob/master/src/defaultRanges.js) | -
134140

135141
*shape of range:
136142
```js

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-date-range",
3-
"version": "1.1.0",
3+
"version": "1.0.0",
44
"description": "A React component for choosing dates and date ranges.",
55
"main": "dist/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)