[MEF]+script
This commit is contained in:
parent
2cbf44d4a0
commit
f0459e908b
17 changed files with 600 additions and 64 deletions
51
Yavsc/wwwroot/lib/jonthornton-Datepair/jquery.datepair.js
Normal file
51
Yavsc/wwwroot/lib/jonthornton-Datepair/jquery.datepair.js
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/*!
|
||||
* 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
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
|
||||
if(!$) {
|
||||
return;
|
||||
}
|
||||
|
||||
////////////
|
||||
// Plugin //
|
||||
////////////
|
||||
|
||||
$.fn.datepair = function(option) {
|
||||
var out;
|
||||
this.each(function() {
|
||||
var $this = $(this);
|
||||
var data = $this.data('datepair');
|
||||
var options = typeof option === 'object' && option;
|
||||
|
||||
if (!data) {
|
||||
data = new Datepair(this, options);
|
||||
$this.data('datepair', data);
|
||||
}
|
||||
|
||||
if (option === 'remove') {
|
||||
out = data['remove']();
|
||||
$this.removeData('datepair', data);
|
||||
}
|
||||
|
||||
if (typeof option === 'string') {
|
||||
out = data[option]();
|
||||
}
|
||||
});
|
||||
|
||||
return out || this;
|
||||
};
|
||||
|
||||
//////////////
|
||||
// Data API //
|
||||
//////////////
|
||||
|
||||
$('[data-datepair]').each(function() {
|
||||
var $this = $(this);
|
||||
$this.datepair($this.data());
|
||||
});
|
||||
|
||||
}(window.Zepto || window.jQuery));
|
||||
Loading…
Add table
Add a link
Reference in a new issue