@@ -195,18 +195,18 @@ ranges: Object
195
195
Default:
196
196
``` javascript
197
197
{
198
- ' Last 30 days' : [moment ().subtract (29 , ' days' ), moment ()]
199
- ' Last 90 days' : [moment ().subtract (89 , ' days' ), moment ()]
200
- ' Last Year' : [moment ().subtract (1 , ' year' ).add (1 ,' day' ), moment ()]
201
- ' All Time' : ' all-time' // [minDate, maxDate]
198
+ ' Last 30 days' : [moment ().subtract (29 , ' days' ), moment ()],
199
+ ' Last 90 days' : [moment ().subtract (89 , ' days' ), moment ()],
200
+ ' Last Year' : [moment ().subtract (1 , ' year' ).add (1 ,' day' ), moment ()],
201
+ ' All Time' : ' all-time' // [minDate, maxDate],
202
202
' Custom Range' : ' custom'
203
203
}
204
204
```
205
205
206
206
Examples:
207
207
``` javascript
208
208
ranges: {
209
- ' Last 245 Days' : [moment ().subtract (244 , ' days' ), moment ()]
209
+ ' Last 245 Days' : [moment ().subtract (244 , ' days' ), moment ()],
210
210
' Last 3 Years' : [moment ().subtract (3 , ' years' ).add (1 , ' day' ), moment ()]
211
211
}
212
212
```
@@ -235,6 +235,22 @@ Array of available _periods_. Period selector disappears if only one period spec
235
235
periods: String []
236
236
```
237
237
238
+ ### customPeriodRanges
239
+
240
+ Similar to ranges except they are appended to the period row across the top of the picker.
241
+
242
+ ``` javascript
243
+ ranges: Object
244
+ ```
245
+
246
+ Examples:
247
+ ``` javascript
248
+ customPeriodRanges: {
249
+ ' Last Year' : [moment ().subtract (1 , ' year' ).add (1 ,' day' ), moment ()],
250
+ ' All Time' : ' all-time' // [minDate, maxDate]
251
+ }
252
+ ```
253
+
238
254
### single
239
255
``` javascript
240
256
single: Boolean
0 commit comments