; !
function() {
"use strict";
var e = window.layui && layui.define,
t = {
getPath: function() {
var e = document.currentScript ? document.currentScript.src: function() {
for (var e, t = document.scripts,
n = t.length - 1,
a = n; a > 0; a--) if ("interactive" === t[a].readyState) {
e = t[a].src;
break
}
return e || t[n].src
} ();
return e.substring(0, e.lastIndexOf("/") + 1)
} (),
getStyle: function(e, t) {
var n = e.currentStyle ? e.currentStyle: window.getComputedStyle(e, null);
return n[n.getPropertyValue ? "getPropertyValue": "getAttribute"](t)
},
link: function(e, a, i) {
if (n.path) {
var r = document.getElementsByTagName("head")[0],
o = document.createElement("link");
"string" == typeof a && (i = a);
var s = (i || e).replace(/\.|\//g, ""),
l = "layuicss-" + s,
d = 0;
o.rel = "stylesheet",
o.href = n.path + e,
o.id = l,
document.getElementById(l) || r.appendChild(o),
"function" == typeof a && !
function c() {
return++d > 80 ? window.console && console.error("laydate.css: Invalid") : void(1989 === parseInt(t.getStyle(document.getElementById(l), "width")) ? a() : setTimeout(c, 100))
} ()
}
}
},
n = {
v: "5.0.9",
config: {},
index: window.laydate && window.laydate.v ? 1e5: 0,
path: t.getPath,
set: function(e) {
var t = this;
return t.config = w.extend({},
t.config, e),
t
},
ready: function(a) {
var i = "laydate",
r = "",
o = (e ? "modules/laydate/": "theme/") + "default/laydate.css?v=" + n.v + r;
return e ? layui.addcss(o, a, i) : t.link(o, a, i),
this
}
},
a = function() {
var e = this;
return {
hint: function(t) {
e.hint.call(e, t)
},
config: e.config
}
},
i = "laydate",
r = ".layui-laydate",
o = "layui-this",
s = "laydate-disabled",
l = "开始日期超出了结束日期
建议重新选择",
d = [100, 2e5],
c = "layui-laydate-static",
m = "layui-laydate-list",
u = "laydate-selected",
h = "layui-laydate-hint",
y = "laydate-day-prev",
f = "laydate-day-next",
p = "layui-laydate-footer",
g = ".laydate-btns-confirm",
v = "laydate-time-text",
D = ".laydate-btns-time",
T = function(e) {
var t = this;
t.index = ++n.index,
t.config = w.extend({},
t.config, n.config, e),
n.ready(function() {
t.init()
})
},
w = function(e) {
return new C(e)
},
C = function(e) {
for (var t = 0,
n = "object" == typeof e ? [e] : (this.selector = e, document.querySelectorAll(e || null)); t < n.length; t++) this.push(n[t])
};
C.prototype = [],
C.prototype.constructor = C,
w.extend = function() {
var e = 1,
t = arguments,
n = function(e, t) {
e = e || (t.constructor === Array ? [] : {});
for (var a in t) e[a] = t[a] && t[a].constructor === Object ? n(e[a], t[a]) : t[a];
return e
};
for (t[0] = "object" == typeof t[0] ? t[0] : {}; e < t.length; e++)"object" == typeof t[e] && n(t[0], t[e]);
return t[0]
},
w.ie = function() {
var e = navigator.userAgent.toLowerCase();
return !! (window.ActiveXObject || "ActiveXObject" in window) && ((e.match(/msie\s(\d+)/) || [])[1] || "11")
} (),
w.stope = function(e) {
e = e || window.event,
e.stopPropagation ? e.stopPropagation() : e.cancelBubble = !0
},
w.each = function(e, t) {
var n, a = this;
if ("function" != typeof t) return a;
if (e = e || [], e.constructor === Object) {
for (n in e) if (t.call(e[n], n, e[n])) break
} else for (n = 0; n < e.length && !t.call(e[n], n, e[n]); n++);
return a
},
w.digit = function(e, t, n) {
var a = "";
e = String(e),
t = t || 2;
for (var i = e.length; i < t; i++) a += "0";
return e < Math.pow(10, t) ? a + (0 | e) : e
},
w.elem = function(e, t) {
var n = document.createElement(e);
return w.each(t || {},
function(e, t) {
n.setAttribute(e, t)
}),
n
},
C.addStr = function(e, t) {
return e = e.replace(/\s+/, " "),
t = t.replace(/\s+/, " ").split(" "),
w.each(t,
function(t, n) {
new RegExp("\\b" + n + "\\b").test(e) || (e = e + " " + n)
}),
e.replace(/^\s|\s$/, "")
},
C.removeStr = function(e, t) {
return e = e.replace(/\s+/, " "),
t = t.replace(/\s+/, " ").split(" "),
w.each(t,
function(t, n) {
var a = new RegExp("\\b" + n + "\\b");
a.test(e) && (e = e.replace(a, ""))
}),
e.replace(/\s+/, " ").replace(/^\s|\s$/, "")
},
C.prototype.find = function(e) {
var t = this,
n = 0,
a = [],
i = "object" == typeof e;
return this.each(function(r, o) {
for (var s = i ? [e] : o.querySelectorAll(e || null); n < s.length; n++) a.push(s[n]);
t.shift()
}),
i || (t.selector = (t.selector ? t.selector + " ": "") + e),
w.each(a,
function(e, n) {
t.push(n)
}),
t
},
C.prototype.each = function(e) {
return w.each.call(this, this, e)
},
C.prototype.addClass = function(e, t) {
return this.each(function(n, a) {
a.className = C[t ? "removeStr": "addStr"](a.className, e)
})
},
C.prototype.removeClass = function(e) {
return this.addClass(e, !0)
},
C.prototype.hasClass = function(e) {
var t = !1;
return this.each(function(n, a) {
new RegExp("\\b" + e + "\\b").test(a.className) && (t = !0)
}),
t
},
C.prototype.attr = function(e, t) {
var n = this;
return void 0 === t ?
function() {
if (n.length > 0) return n[0].getAttribute(e)
} () : n.each(function(n, a) {
a.setAttribute(e, t)
})
},
C.prototype.removeAttr = function(e) {
return this.each(function(t, n) {
n.removeAttribute(e)
})
},
C.prototype.html = function(e) {
return this.each(function(t, n) {
n.innerHTML = e
})
},
C.prototype.val = function(e) {
return this.each(function(t, n) {
n.value = e
})
},
C.prototype.append = function(e) {
return this.each(function(t, n) {
"object" == typeof e ? n.appendChild(e) : n.innerHTML = n.innerHTML + e
})
},
C.prototype.remove = function(e) {
return this.each(function(t, n) {
e ? n.removeChild(e) : n.parentNode.removeChild(n)
})
},
C.prototype.on = function(e, t) {
return this.each(function(n, a) {
a.attachEvent ? a.attachEvent("on" + e,
function(e) {
e.target = e.srcElement,
t.call(a, e)
}) : a.addEventListener(e, t, !1)
})
},
C.prototype.off = function(e, t) {
return this.each(function(n, a) {
a.detachEvent ? a.detachEvent("on" + e, t) : a.removeEventListener(e, t, !1)
})
},
T.isLeapYear = function(e) {
return e % 4 === 0 && e % 100 !== 0 || e % 400 === 0
},
T.prototype.config = {
type: "date",
range: !1,
format: "yyyy-MM-dd",
value: null,
min: "1900-1-1",
max: "2099-12-31",
trigger: "focus",
show: !1,
showBottom: !0,
btns: ["clear", "now", "confirm"],
lang: "cn",
theme: "default",
position: null,
calendar: !1,
mark: {},
zIndex: null,
done: null,
change: null
},
T.prototype.lang = function() {
var e = this,
t = e.config,
n = {
cn: {
weeks: ["日", "一", "二", "三", "四", "五", "六"],
time: ["时", "分", "秒"],
timeTips: "选择时间",
startTime: "开始时间",
endTime: "结束时间",
dateTips: "返回日期",
month: ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二"],
tools: {
confirm: "确定",
clear: "清空",
now: "现在"
}
},
en: {
weeks: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
time: ["Hours", "Minutes", "Seconds"],
timeTips: "Select Time",
startTime: "Start Time",
endTime: "End Time",
dateTips: "Select Date",
month: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
tools: {
confirm: "Confirm",
clear: "Clear",
now: "Now"
}
}
};
return n[t.lang] || n.cn
},
T.prototype.init = function() {
var e = this,
t = e.config,
n = "yyyy|y|MM|M|dd|d|HH|H|mm|m|ss|s",
a = "static" === t.position,
i = {
year: "yyyy",
month: "yyyy-MM",
date: "yyyy-MM-dd",
time: "HH:mm:ss",
datetime: "yyyy-MM-dd HH:mm:ss"
};
t.elem = w(t.elem),
t.eventElem = w(t.eventElem),
t.elem[0] && (t.range === !0 && (t.range = "-"), t.format === i.date && (t.format = i[t.type]), e.format = t.format.match(new RegExp(n + "|.", "g")) || [], e.EXP_IF = "", e.EXP_SPLIT = "", w.each(e.format,
function(t, a) {
var i = new RegExp(n).test(a) ? "\\d{" +
function() {
return new RegExp(n).test(e.format[0 === t ? t + 1 : t - 1] || "") ? /^yyyy|y$/.test(a) ? 4 : a.length: /^yyyy$/.test(a) ? "1,4": /^y$/.test(a) ? "1,308": "1,2"
} () + "}": "\\" + a;
e.EXP_IF = e.EXP_IF + i,
e.EXP_SPLIT = e.EXP_SPLIT + "(" + i + ")"
}), e.EXP_IF = new RegExp("^" + (t.range ? e.EXP_IF + "\\s\\" + t.range + "\\s" + e.EXP_IF: e.EXP_IF) + "$"), e.EXP_SPLIT = new RegExp("^" + e.EXP_SPLIT + "$", ""), e.isInput(t.elem[0]) || "focus" === t.trigger && (t.trigger = "click"), t.elem.attr("lay-key") || (t.elem.attr("lay-key", e.index), t.eventElem.attr("lay-key", e.index)), t.mark = w.extend({},
t.calendar && "cn" === t.lang ? {
"0-1-1": "元旦",
"0-2-14": "情人",
"0-3-8": "妇女",
"0-3-12": "植树",
"0-4-1": "愚人",
"0-5-1": "劳动",
"0-5-4": "青年",
"0-6-1": "儿童",
"0-9-10": "教师",
"0-9-18": "国耻",
"0-10-1": "国庆",
"0-12-25": "圣诞"
}: {},
t.mark), w.each(["min", "max"],
function(e, n) {
var a = [],
i = [];
if ("number" == typeof t[n]) {
var r = t[n],
o = (new Date).getTime(),
s = 864e5,
l = new Date(r ? r < s ? o + r * s: r: o);
a = [l.getFullYear(), l.getMonth() + 1, l.getDate()],
r < s || (i = [l.getHours(), l.getMinutes(), l.getSeconds()])
} else a = (t[n].match(/\d+-\d+-\d+/) || [""])[0].split("-"),
i = (t[n].match(/\d+:\d+:\d+/) || [""])[0].split(":");
t[n] = {
year: 0 | a[0] || (new Date).getFullYear(),
month: a[1] ? (0 | a[1]) - 1 : (new Date).getMonth(),
date: 0 | a[2] || (new Date).getDate(),
hours: 0 | i[0],
minutes: 0 | i[1],
seconds: 0 | i[2]
}
}), e.elemID = "layui-laydate" + t.elem.attr("lay-key"), (t.show || a) && e.render(), a || e.events(), t.value && (t.value.constructor === Date ? e.setValue(e.parse(0, e.systemDate(t.value))) : e.setValue(t.value)))
},
T.prototype.render = function() {
var e = this,
t = e.config,
n = e.lang(),
a = "static" === t.position,
i = e.elem = w.elem("div", {
id: e.elemID,
"class": ["layui-laydate", t.range ? " layui-laydate-range": "", a ? " " + c: "", t.theme && "default" !== t.theme && !/^#/.test(t.theme) ? " laydate-theme-" + t.theme: ""].join("")
}),
r = e.elemMain = [],
o = e.elemHeader = [],
s = e.elemCont = [],
l = e.table = [],
d = e.footer = w.elem("div", {
"class": p
});
if (t.zIndex && (i.style.zIndex = t.zIndex), w.each(new Array(2),
function(e) {
if (!t.range && e > 0) return ! 0;
var a = w.elem("div", {
"class": "layui-laydate-header"
}),
i = [function() {
var e = w.elem("i", {
"class": "layui-icon laydate-icon laydate-prev-y"
});
return e.innerHTML = "",
e
} (),
function() {
var e = w.elem("i", {
"class": "layui-icon laydate-icon laydate-prev-m"
});
return e.innerHTML = "",
e
} (),
function() {
var e = w.elem("div", {
"class": "laydate-set-ym"
}),
t = w.elem("span"),
n = w.elem("span");
return e.appendChild(t),
e.appendChild(n),
e
} (),
function() {
var e = w.elem("i", {
"class": "layui-icon laydate-icon laydate-next-m"
});
return e.innerHTML = "",
e
} (),
function() {
var e = w.elem("i", {
"class": "layui-icon laydate-icon laydate-next-y"
});
return e.innerHTML = "",
e
} ()],
d = w.elem("div", {
"class": "layui-laydate-content"
}),
c = w.elem("table"),
m = w.elem("thead"),
u = w.elem("tr");
w.each(i,
function(e, t) {
a.appendChild(t)
}),
m.appendChild(u),
w.each(new Array(6),
function(e) {
var t = c.insertRow(0);
w.each(new Array(7),
function(a) {
if (0 === e) {
var i = w.elem("th");
i.innerHTML = n.weeks[a],
u.appendChild(i)
}
t.insertCell(a)
})
}),
c.insertBefore(m, c.children[0]),
d.appendChild(c),
r[e] = w.elem("div", {
"class": "layui-laydate-main laydate-main-list-" + e
}),
r[e].appendChild(a),
r[e].appendChild(d),
o.push(i),
s.push(d),
l.push(c)
}), w(d).html(function() {
var e = [],
i = [];
return "datetime" === t.type && e.push('' + n.timeTips + ""),
w.each(t.btns,
function(e, r) {
var o = n.tools[r] || "btn";
t.range && "now" === r || (a && "clear" === r && (o = "cn" === t.lang ? "重置": "Reset"), i.push('' + o + ""))
}),
e.push('
" + r.time[e] + "