You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 31, 2021. It is now read-only.
I submitted your code (with a little bit modifies) in a pull request #503 and hope you can understand that it is not my intention to 'steal' or 'copy' your contribution. Community can still trace your contribution through reference marked in this conversation.
css日历时间段选择样式
.picker-calendar-range .picker-calendar-day.picker-calendar-day-selected {
-webkit-box-align: stretch;
-ms-flex-align: stretch;
-webkit-align-items: stretch;
align-items: stretch;
-ms-flex-line-pack: stretch;
-webkit-align-content: stretch;
align-content: stretch;
}
.picker-calendar-range .picker-calendar-day.picker-calendar-day-selected span {
width: 100%;
border-radius: 0;
height: auto;
text-align: center;
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
}
js的修改
+function ($) {
"use strict";
var rtl = false;
var defaults;
var Calendar = function (params) {
var p = this;
params = params || {};
for (var def in defaults) {
if (typeof params[def] === 'undefined') {
params[def] = defaults[def];
}
}
p.params = params;
p.initialized = false;
};
var format = function(d) {
return d < 10 ? "0"+d : d;
}
$.fn.calendar = function (params, args) {$this = $ (this);
params = params || {};
return this.each(function() {
var
if(!$this[0]) return;
var p = {};
if($this[0].tagName.toUpperCase() === "INPUT") {
p.input = $this;
} else {
p.container = $this;
}
};
defaults = $.fn.calendar.prototype.defaults = {
value: undefined, // 通过JS赋值,注意是数组
monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
monthNamesShort: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
dayNames: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
dayNamesShort: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
firstDay: 1, // First day of the week, Monday
weekendDays: [0, 6], // Sunday and Saturday
multiple: false,
rangePicker: false,
dateFormat: 'yyyy-mm-dd',
direction: 'horizontal', // or 'vertical'
minDate: null,
maxDate: null,
disabled: null, // dates range of disabled days
events: null, // dates range of days with events
rangesClasses: null, //array with custom classes date ranges
touchMove: true,
animate: true,
closeOnSelect: true,
monthPicker: true,
monthPickerTemplate:
'
'' +
'' +
'' +
'
yearPicker: true,
yearPickerTemplate:
'
'' +
'' +
'' +
'
weekHeader: true,
// Common settings
scrollToInput: true,
inputReadOnly: true,
convertToPopover: true,
onlyInPopover: false,
toolbar: true,
toolbarCloseText: 'Done',
toolbarTemplate:
'
'
'{{yearPicker}}' +
'{{monthPicker}}' +
// '{{closeText}}' +
'
'
/* Callbacks
onMonthAdd
onChange
onOpen
onClose
onDayClick
onMonthYearChangeStart
onMonthYearChangeEnd
*/
};
}($);
The text was updated successfully, but these errors were encountered: