daterangepicker-4.x 4.2.1 → 4.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/daterangepicker.js +7 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,8 +18,8 @@ Above samples are based on the [original repository](https://github.com/dangross
|
|
|
18
18
|
```html
|
|
19
19
|
<script type="text/javascript" src="https://cdn.jsdelivr.net/jquery/latest/jquery.min.js"></script>
|
|
20
20
|
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/luxon@3.5.0/build/global/luxon.min.js"></script>
|
|
21
|
-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker-4.x@4.2.
|
|
22
|
-
<link type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker-4.x@4.2.
|
|
21
|
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker-4.x@4.2.2/daterangepicker.min.js"></script>
|
|
22
|
+
<link type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker-4.x@4.2.2/daterangepicker.min.css" rel="stylesheet" />
|
|
23
23
|
|
|
24
24
|
<input type="text" id="daterange" />
|
|
25
25
|
|
|
@@ -482,10 +482,10 @@ Options for DateRangePicker
|
|
|
482
482
|
| timePickerSeconds | <code>boolean</code> | <code>boolean</code> | **Deprecated**, use `timePickerStepSize`<br/>Show seconds in the timePicker |
|
|
483
483
|
| timePickerIncrement | <code>boolean</code> | <code>1</code> | **Deprecated**, use `timePickerStepSize`<br/>Increment of the minutes selection list for times |
|
|
484
484
|
| autoUpdateInput | <code>boolean</code> | <code>true</code> | Indicates whether the date range picker should instantly update the value of the attached `<input>` element when the selected dates change.<br/>The `<input>` element will be always updated on `Apply` and reverted when user clicks on `Cancel`. |
|
|
485
|
-
| onOutsideClick | <code>string</code> | <code>"
|
|
485
|
+
| onOutsideClick | <code>string</code> | <code>"apply"</code> | Defines what picker shall do when user clicks outside the calendar. `'apply'` or `'cancel'`. Event [onOutsideClick.daterangepicker](#event_outsideClick.daterangepicker) is always emitted. |
|
|
486
486
|
| linkedCalendars | <code>boolean</code> | <code>true</code> | When enabled, the two calendars displayed will always be for two sequential months (i.e. January and February), and both will be advanced when clicking the left or right arrows above the calendars.<br/> When disabled, the two calendars can be individually advanced and display any month/year |
|
|
487
|
-
| isInvalidDate | <code>function</code> | <code>false</code> | A function that is passed each date in the two calendars before they are displayed,<br/> and may return `true` or `false` to indicate whether that date should be available for selection or not.<br/> Signature: `isInvalidDate(date)
|
|
488
|
-
| isInvalidTime | <code>function</code> | <code>false</code> | A function that is passed each hour/minute/second/am-pm in the two calendars before they are displayed,<br/> and may return `true` or `false` to indicate whether that date should be available for selection or not.<br/> Signature: `isInvalidDate(time, side, unit)`<br/> `side` is 'start' or 'end' or `null` for `singleDatePicker
|
|
487
|
+
| isInvalidDate | <code>function</code> | <code>false</code> | A function that is passed each date in the two calendars before they are displayed,<br/> and may return `true` or `false` to indicate whether that date should be available for selection or not.<br/> Signature: `isInvalidDate(date)`<br/> Function has no effect on date values set by `startDate`, `endDate`, `ranges`, [setStartDate](#DateRangePicker+setStartDate), [setEndDate](#DateRangePicker+setEndDate). |
|
|
488
|
+
| isInvalidTime | <code>function</code> | <code>false</code> | A function that is passed each hour/minute/second/am-pm in the two calendars before they are displayed,<br/> and may return `true` or `false` to indicate whether that date should be available for selection or not.<br/> Signature: `isInvalidDate(time, side, unit)`<br/> `side` is `'start'` or `'end'` or `null` for `singleDatePicker: true`<br/> `unit` is `'hour'`, `'minute'`, `'second'` or `'ampm'`<br/> Hours are always given as 24-hour clock<br/> Function has no effect on time values set by `startDate`, `endDate`, `ranges`, [setStartDate](#DateRangePicker+setStartDate), [setEndDate](#DateRangePicker+setEndDate).<br/> Ensure that your function returns `false` for at least one item. Otherwise the calender is not rendered.<br/> |
|
|
489
489
|
| isCustomDate | <code>function</code> | <code>false</code> | A function that is passed each date in the two calendars before they are displayed, and may return a string or array of CSS class names to apply to that date's calendar cell.<br/> Signature: `isCustomDate(date)` |
|
|
490
490
|
| applyButtonClasses | <code>string</code> | <code>"btn-primary"</code> | CSS class names that will be added only to the apply button |
|
|
491
491
|
| cancelButtonClasses | <code>string</code> | <code>"btn-default"</code> | CSS class names that will be added only to the cancel button |
|
|
@@ -500,9 +500,9 @@ Options for DateRangePicker
|
|
|
500
500
|
| locale.format | <code>object</code> \| <code>string</code> | | Default: `DateTime.DATE_SHORT`<br/>Date formats. Either given as string, see [Format Tokens](https://moment.github.io/luxon/#/formatting?id=table-of-tokens) or an object according to [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat)<br/> I recommend to use the luxon [Presets](https://moment.github.io/luxon/#/formatting?id=presets). |
|
|
501
501
|
| locale.separator= | <code>string</code> | | Defaut: `' - '` - Separator for start and end time |
|
|
502
502
|
| locale.weekLabel | <code>string</code> | <code>"W"</code> | Label for week numbers |
|
|
503
|
-
| locale.daysOfWeek | <code>Array</code> | | Default: `
|
|
504
|
-
| locale.monthNames | <code>Array</code> | | Default: `Info.months('long')`<br/>Array with month names |
|
|
505
|
-
| locale.firstDay | <code>number</code> | | Default: `Info.getStartOfWeek()`<br/>First day of the week, 1 for Monday through 7 for Sunday |
|
|
503
|
+
| locale.daysOfWeek | <code>Array</code> | | Default: `luxon.weekdays('short')`<br/>Array with weekday names, from Monday to Sunday |
|
|
504
|
+
| locale.monthNames | <code>Array</code> | | Default: `luxon.Info.months('long')`<br/>Array with month names |
|
|
505
|
+
| locale.firstDay | <code>number</code> | | Default: `luxon.Info.getStartOfWeek()`<br/>First day of the week, 1 for Monday through 7 for Sunday |
|
|
506
506
|
| locale.applyLabel | <code>string</code> | <code>"Apply"</code> | Label of `Apply` Button |
|
|
507
507
|
| locale.cancelLabel | <code>string</code> | <code>"Cancel"</code> | Label of `Cancel` Button |
|
|
508
508
|
| locale.customRangeLabel | <code>string</code> | <code>"Custom"</code> | Range - Title for custom ranges |
|
package/daterangepicker.js
CHANGED
|
@@ -89,20 +89,21 @@
|
|
|
89
89
|
|
|
90
90
|
* @property {boolean} autoUpdateInput=true - Indicates whether the date range picker should instantly update the value of the attached `<input>`
|
|
91
91
|
* element when the selected dates change.<br/>The `<input>` element will be always updated on `Apply` and reverted when user clicks on `Cancel`.
|
|
92
|
-
* @property {string} onOutsideClick=
|
|
92
|
+
* @property {string} onOutsideClick=apply - Defines what picker shall do when user clicks outside the calendar.
|
|
93
93
|
* `'apply'` or `'cancel'`. Event {@link #event_outsideClick.daterangepicker|onOutsideClick.daterangepicker} is always emitted.
|
|
94
94
|
* @property {boolean} linkedCalendars=true - When enabled, the two calendars displayed will always be for two sequential months (i.e. January and February),
|
|
95
95
|
* and both will be advanced when clicking the left or right arrows above the calendars.<br/>
|
|
96
96
|
* When disabled, the two calendars can be individually advanced and display any month/year
|
|
97
97
|
* @property {function} isInvalidDate=false - A function that is passed each date in the two calendars before they are displayed,<br/>
|
|
98
98
|
* and may return `true` or `false` to indicate whether that date should be available for selection or not.<br/>
|
|
99
|
-
* Signature: `isInvalidDate(date)
|
|
99
|
+
* Signature: `isInvalidDate(date)`<br/>
|
|
100
100
|
* Function has no effect on date values set by `startDate`, `endDate`, `ranges`, {@link #DateRangePicker+setStartDate|setStartDate}, {@link #DateRangePicker+setEndDate|setEndDate}.
|
|
101
101
|
* @property {function} isInvalidTime=false - A function that is passed each hour/minute/second/am-pm in the two calendars before they are displayed,<br/>
|
|
102
102
|
* and may return `true` or `false` to indicate whether that date should be available for selection or not.<br/>
|
|
103
103
|
* Signature: `isInvalidDate(time, side, unit)`<br/>
|
|
104
|
-
* `side` is 'start' or 'end' or `null` for `singleDatePicker
|
|
104
|
+
* `side` is `'start'` or `'end'` or `null` for `singleDatePicker: true`<br/>
|
|
105
105
|
* `unit` is `'hour'`, `'minute'`, `'second'` or `'ampm'`<br/>
|
|
106
|
+
* Hours are always given as 24-hour clock<br/>
|
|
106
107
|
* Function has no effect on time values set by `startDate`, `endDate`, `ranges`, {@link #DateRangePicker+setStartDate|setStartDate}, {@link #DateRangePicker+setEndDate|setEndDate}.<br/>
|
|
107
108
|
* Ensure that your function returns `false` for at least one item. Otherwise the calender is not rendered.<br/>
|
|
108
109
|
* @property {function} isCustomDate=false - A function that is passed each date in the two calendars before they are displayed,
|
|
@@ -135,9 +136,9 @@
|
|
|
135
136
|
* I recommend to use the luxon [Presets](https://moment.github.io/luxon/#/formatting?id=presets).
|
|
136
137
|
* @property {string} locale.separator= - Defaut: `' - '` - Separator for start and end time
|
|
137
138
|
* @property {string} locale.weekLabel=W - Label for week numbers
|
|
138
|
-
* @property {Array} locale.daysOfWeek - Default: `
|
|
139
|
-
* @property {Array} locale.monthNames - Default: `Info.months('long')`<br/>Array with month names
|
|
140
|
-
* @property {number} locale.firstDay - Default: `Info.getStartOfWeek()`<br/>First day of the week, 1 for Monday through 7 for Sunday
|
|
139
|
+
* @property {Array} locale.daysOfWeek - Default: `luxon.weekdays('short')`<br/>Array with weekday names, from Monday to Sunday
|
|
140
|
+
* @property {Array} locale.monthNames - Default: `luxon.Info.months('long')`<br/>Array with month names
|
|
141
|
+
* @property {number} locale.firstDay - Default: `luxon.Info.getStartOfWeek()`<br/>First day of the week, 1 for Monday through 7 for Sunday
|
|
141
142
|
* @property {string} locale.applyLabel=Apply - Label of `Apply` Button
|
|
142
143
|
* @property {string} locale.cancelLabel=Cancel - Label of `Cancel` Button
|
|
143
144
|
* @property {string} locale.customRangeLabel=Custom Range - Title for custom ranges
|