Comparing version 1.4.4 to 1.4.5
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
[1.4.5] - 2019-11-03 | ||
* Added onSelectStart and onSelectEnd helper functions - PR #61 - Thanks @scssyworks | ||
[1.4.4] - 2019-11-03 | ||
@@ -5,0 +8,0 @@ * Fix autoclose refresh date issue - #74 |
@@ -89,2 +89,4 @@ /** | ||
onSelect: null, | ||
onSelectStart: null, | ||
onSelectEnd: null, | ||
onOpen: null, | ||
@@ -1108,2 +1110,6 @@ onClose: null, | ||
} | ||
if (!preventOnSelect && !this._opts.singleDate && typeof this._opts.onSelectStart === 'function') { | ||
this._opts.onSelectStart.call(this, this.getStartDate()); | ||
} | ||
}, | ||
@@ -1141,2 +1147,6 @@ | ||
} | ||
if (!preventOnSelect && !this._opts.singleDate && typeof this._opts.onSelectEnd === 'function') { | ||
this._opts.onSelectEnd.call(this, this.getEndDate()); | ||
} | ||
}, | ||
@@ -1143,0 +1153,0 @@ |
{ | ||
"name": "lightpick", | ||
"version": "1.4.4", | ||
"version": "1.4.5", | ||
"description": "Javascript date range picker - lightweight, no jQuery", | ||
@@ -5,0 +5,0 @@ "main": "lightpick.js", |
@@ -75,3 +75,3 @@ [![npm version](https://badge.fury.io/js/lightpick.svg)](https://www.npmjs.com/package/lightpick) [![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/wakirin/lightpick/blob/master/LICENSE) | ||
### parentEl | ||
- Type: `String` | ||
- Type: `String | Element` | ||
- Default: `body` | ||
@@ -282,2 +282,14 @@ | ||
### onSelectStart | ||
- Type: `Function` | ||
- Default: `null` | ||
Callback function for when a start date is selected (only when singleDate=false). | ||
### onSelectEnd | ||
- Type: `Function` | ||
- Default: `null` | ||
Callback function for when a end date is selected (only when singleDate=false). | ||
### onOpen | ||
@@ -284,0 +296,0 @@ - Type: `Function` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
140732
1902
377