Skip to content

Commit

Permalink
Fix remove() not working for jquery version
Browse files Browse the repository at this point in the history
  • Loading branch information
jonthornton committed Nov 14, 2016
1 parent f34541e commit 5d243d5
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "datepair.js",
"version": "0.4.14",
"version": "0.4.15",
"main": ["dist/datepair.js", "dist/jquery.datepair.js"],
"ignore": [
"**/.*",
Expand Down
4 changes: 2 additions & 2 deletions dist/datepair.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* datepair.js v0.4.14 - A javascript plugin for intelligently selecting date and time ranges inspired by Google Calendar.
* Copyright (c) 2015 Jon Thornton - http://jonthornton.github.com/Datepair.js
* datepair.js v0.4.15 - A javascript plugin for intelligently selecting date and time ranges inspired by Google Calendar.
* Copyright (c) 2016 Jon Thornton - http://jonthornton.github.com/Datepair.js
* License: MIT
*/

Expand Down
6 changes: 3 additions & 3 deletions dist/datepair.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions dist/jquery.datepair.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* datepair.js v0.4.14 - A javascript plugin for intelligently selecting date and time ranges inspired by Google Calendar.
* Copyright (c) 2015 Jon Thornton - http://jonthornton.github.com/Datepair.js
* datepair.js v0.4.15 - A javascript plugin for intelligently selecting date and time ranges inspired by Google Calendar.
* Copyright (c) 2016 Jon Thornton - http://jonthornton.github.com/Datepair.js
* License: MIT
*/

Expand All @@ -26,6 +26,11 @@
$this.data('datepair', data);
}

if (option === 'remove') {
out = data['remove']();
$this.removeData('datepair', data);
}

if (typeof option === 'string') {
out = data[option]();
}
Expand Down
Loading

0 comments on commit 5d243d5

Please sign in to comment.