我必须让这个日历从星期一开始几周,我使用了 Codepen 的一些代码,但我无法更改此选项。这里是 codepen 的链接:https ://codepen.io/jtrumbull/pen/obPMWg
var Calendar = function (elem, options) {
this.elem = elem;
this.options = $.extend({}, Calendar.DEFAULTS, options);
this.init();
};
Calendar.DEFAULTS = {
datetime: undefined,
dayFormat: 'DDD',
weekFormat: 'DDD',
monthFormat: 'MM/DD/YYYY',
weekStart: '1',
view: undefined,
};
Calendar.prototype.init = function () {
if (! this.options.datetime || this.options.datetime == 'now') {
this.options.datetime = moment();
}
if (! this.options.view) {
this.options.view = 'month';
}
this.initScaffold()
.initStyle()
.render();
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句