You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@ All notable changes to this project will be documented in this file.
4
4
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
7
-
## 1.1.0
7
+
## 1.0.0
8
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/))
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))
10
10
11
11
```jsx
12
12
<Calendar
@@ -20,12 +20,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
20
20
### Added
21
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
22
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
24
24
25
25
-`startDatePlaceholder` and `endDatePlaceholder` props: You can set different placeholders for Date inputs. If not set, falls back to 'Early' and 'Continuous'.
26
26
27
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.
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).
100
100
className | String | | wrapper classname
101
101
months | Number | 1 | rendered month count
102
102
showSelectionPreview | Boolean | true | show preview on focused/hovered dates
@@ -107,7 +107,7 @@ minDate | Date | | defines mi
107
107
maxDate | Date | | defines maximum date. Disabled later dates
108
108
direction | String | 'vertical' | direction of calendar months. can be `vertical` or `horizontal`
109
109
disabledDates | Date[] | [] | dates that are disabled
navigatorRenderer | Func | | renderer for focused date navigation area. fn(currentFocusedDate: Date, changeShownDate: func, props: object)
113
113
ranges | *Object[] | [] | Defines ranges. array of range object
@@ -121,16 +121,22 @@ onShownDateChange(DateRange,Calendar)| Function | | Callback f
121
121
initialFocusedRange(DateRange) | Object | | Initial value for focused range. See `focusedRange` for usage.
122
122
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).
123
123
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 }`
125
125
showPreview(DateRange) | bool | true | visibility of preview
126
126
editableDateInputs(Calendar) | bool | false | whether dates can be edited in the Calendar's input fields
127
127
dragSelectionEnabled(Calendar) | bool | true | whether dates can be selected via drag n drop
128
128
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.
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.
0 commit comments