daterangepicker-4.x 4.9.0 → 4.9.1

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 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.9.0/daterangepicker.min.js"></script>
22
- <link type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker-4.x@4.9.0/daterangepicker.min.css" rel="stylesheet" />
21
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker-4.x@4.9.1/daterangepicker.min.js"></script>
22
+ <link type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker-4.x@4.9.1/daterangepicker.min.css" rel="stylesheet" />
23
23
 
24
24
  <input type="text" id="daterange" />
25
25
 
@@ -231,7 +231,7 @@ use <a href="#event_timeChange.daterangepicker">&quot;timeChange.daterangepicker
231
231
  <dd><p>Emitted when the time changed. Does not trigger when date is changed</p>
232
232
  </dd>
233
233
  <dt><a href="#event_inputChanged.daterangepicker">"inputChanged.daterangepicker" (this)</a></dt>
234
- <dd><p>Emitted when the date is changed through <code>&lt;input&gt;</code> element. Event is only triggered when date string is valid date value/range has been changed</p>
234
+ <dd><p>Emitted when the date is changed through <code>&lt;input&gt;</code> element. Event is only triggered when date string is valid and date value has changed</p>
235
235
  </dd>
236
236
  </dl>
237
237
 
@@ -580,7 +580,7 @@ Emitted when the time changed. Does not trigger when date is changed
580
580
  <a name="event_inputChanged.daterangepicker"></a>
581
581
 
582
582
  ## "inputChanged.daterangepicker" (this)
583
- Emitted when the date is changed through `<input>` element. Event is only triggered when date string is valid date value/range has been changed
583
+ Emitted when the date is changed through `<input>` element. Event is only triggered when date string is valid and date value has changed
584
584
 
585
585
  **Kind**: event emitted
586
586
 
@@ -627,6 +627,7 @@ Options for DateRangePicker
627
627
  | 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)` |
628
628
  | altInput | <code>string</code> \| <code>Array</code> | <code>null</code> | A [jQuery selector](https://api.jquery.com/category/selectors/) string for an alternative ouput (typically hidden) `<input>` element. Requires `altFormat` to be set.<br/> Must be a single string for `singleDatePicker: true` or an array of two strings for `singleDatePicker: false`<br/> Example: `['#start', '#end']` |
629
629
  | altFormat | <code>function</code> \| <code>string</code> | <code></code> | The output format used for `altInput`.<br/> Either a string used with [toFormat()](https://moment.github.io/luxon/api-docs/index.html#datetimetoformat) or a function.<br/> Examples: `'yyyyMMddHHmm'`, `(date) => date.toUnixInteger()` |
630
+ | warnings | <code>boolean</code> | <code>true</code> | When enabled, then warning are printed to console if input date violates `minDate`, `maxDate`, `minSpan`, `maxSpan`, `timePickerStepSize`, 'isInvalidDate', 'isInvalidTime' |
630
631
  | applyButtonClasses | <code>string</code> | <code>&quot;btn-primary&quot;</code> | CSS class names that will be added only to the apply button |
631
632
  | cancelButtonClasses | <code>string</code> | <code>&quot;btn-default&quot;</code> | CSS class names that will be added only to the cancel button |
632
633
  | buttonClasses | <code>string</code> | | Default: `'btn btn-sm'`<br/>CSS class names that will be added to both the apply and cancel buttons. |
@@ -119,6 +119,8 @@
119
119
  * @property {function|string} altFormat=null - The output format used for `altInput`.<br/>
120
120
  * Either a string used with {@link https://moment.github.io/luxon/api-docs/index.html#datetimetoformat|toFormat()} or a function.<br/>
121
121
  * Examples: `'yyyyMMddHHmm'`, `(date) => date.toUnixInteger()`
122
+ * @property {boolean} warnings=true - When enabled, then warning are printed to console if input date violates
123
+ * `minDate`, `maxDate`, `minSpan`, `maxSpan`, `timePickerStepSize`, 'isInvalidDate', 'isInvalidTime'
122
124
 
123
125
  * @property {string} applyButtonClasses=btn-primary - CSS class names that will be added only to the apply button
124
126
  * @property {string} cancelButtonClasses=btn-default - CSS class names that will be added only to the cancel button
@@ -2448,7 +2450,8 @@
2448
2450
  }
2449
2451
 
2450
2452
  if (!start.isValid || !end.isValid) {
2451
- console.error(`Input string '${dateString}' is not valid`);
2453
+ // Does not make much sense, because error would be printed on each character
2454
+ //console.error(`Input string '${dateString}' is not valid`);
2452
2455
  return;
2453
2456
  }
2454
2457
  const trigger = this.startDate != start || (!this.singleDatePicker && this.endDate != end);
@@ -2457,7 +2460,7 @@
2457
2460
  this.setEndDate(end, false);
2458
2461
  this.updateView();
2459
2462
  /**
2460
- * Emitted when the date is changed through `<input>` element. Event is only triggered when date string is valid date value/range has been changed
2463
+ * Emitted when the date is changed through `<input>` element. Event is only triggered when date string is valid and date value has changed
2461
2464
  * @event
2462
2465
  * @name "inputChanged.daterangepicker"
2463
2466
  * @param {DateRangePicker} this - The daterangepicker object
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "daterangepicker-4.x",
3
- "version": "4.9.0",
3
+ "version": "4.9.1",
4
4
  "description": "Date range picker with time component and pre-defined ranges",
5
5
  "main": "daterangepicker.js",
6
6
  "style": "daterangepicker.css",