mirror of
https://github.com/frappe/air-datepicker.git
synced 2026-01-14 11:01:22 +08:00
33 lines
836 B
JavaScript
33 lines
836 B
JavaScript
;(function () {
|
|
var pluginName = 'datepicker';
|
|
|
|
function Datepicker () {
|
|
|
|
}
|
|
|
|
Datepicker.prototype = {
|
|
init: function () {
|
|
|
|
}
|
|
};
|
|
|
|
|
|
$.fn[pluginName] = function ( options ) {
|
|
if (Datepicker.prototype[options]) {
|
|
Datepicker.prototype[options].apply(this.data(pluginName), Array.prototype.slice.call(arguments, 1));
|
|
} else {
|
|
return this.each(function () {
|
|
if (!$.data(this, pluginName)) {
|
|
$.data(this, pluginName,
|
|
new Datepicker( this, options ));
|
|
} else {
|
|
var _this = $.data(this, pluginName),
|
|
oldOpts = _this.opts;
|
|
|
|
_this.opts = $.extend({}, oldOpts, options);
|
|
}
|
|
});
|
|
}
|
|
};
|
|
|
|
})(); |