Difference between 8.x 1.21.1 datepicker.min.js and the new patched version 1.21.1 from jquery_ui
471 lines
!(function (a) {
!(function (e) {
"function" == typeof define && define.amd ? define(["jquery", "../version", "../keycode"], a) : a(jQuery);
"function" == typeof define && define.amd ? define(["jquery", "../version", "../keycode"], e) : e(jQuery);
})(function (a) {
})(function (V) {
function b(a) {
var r;
for (var b, c; a.length && a[0] !== document; ) {
function e() {
if (((b = a.css("position")), ("absolute" === b || "relative" === b || "fixed" === b) && ((c = parseInt(a.css("zIndex"), 10)), !isNaN(c) && 0 !== c))) return c;
a = a.parent();
}
return 0;
}
function c() {
(this._curInst = null),
(this._curInst = null),
(this._keyEvent = !1),
(this._keyEvent = !1),
(this._disabledInputs = []),
(this._disabledInputs = []),
(this._datepickerShowing = !1),
(this._datepickerShowing = !1),
(this._inDialog = !1),
(this._inDialog = !1),
(this._mainDivId = "ui-datepicker-div"),
(this._mainDivId = "ui-datepicker-div"),
(this._inlineClass = "ui-datepicker-inline"),
(this._inlineClass = "ui-datepicker-inline"),
(this._appendClass = "ui-datepicker-append"),
(this._appendClass = "ui-datepicker-append"),
(this._triggerClass = "ui-datepicker-trigger"),
(this._triggerClass = "ui-datepicker-trigger"),
(this._dialogClass = "ui-datepicker-dialog"),
(this._dialogClass = "ui-datepicker-dialog"),
(this._disableClass = "ui-datepicker-disabled"),
(this._disableClass = "ui-datepicker-disabled"),
(this._unselectableClass = "ui-datepicker-unselectable"),
(this._unselectableClass = "ui-datepicker-unselectable"),
(this._currentClass = "ui-datepicker-current-day"),
(this._currentClass = "ui-datepicker-current-day"),
(this._dayOverClass = "ui-datepicker-days-cell-over"),
(this._dayOverClass = "ui-datepicker-days-cell-over"),
(this.regional = []),
(this.regional = []),
(this.regional[""] = {
(this.regional[""] = {
closeText: "Done",
closeText: "Done",
prevText: "Prev",
prevText: "Prev",
nextText: "Next",
nextText: "Next",
currentText: "Today",
currentText: "Today",
monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
weekHeader: "Wk",
weekHeader: "Wk",
dateFormat: "mm/dd/yy",
dateFormat: "mm/dd/yy",
firstDay: 0,
firstDay: 0,
isRTL: !1,
isRTL: !1,
showMonthAfterYear: !1,
showMonthAfterYear: !1,
yearSuffix: "",
yearSuffix: "",
}),
}),
(this._defaults = {
(this._defaults = {
showOn: "focus",
showOn: "focus",
showAnim: "fadeIn",
showAnim: "fadeIn",
showOptions: {},
showOptions: {},
defaultDate: null,
defaultDate: null,
appendText: "",
appendText: "",
buttonText: "...",
buttonText: "...",
buttonImage: "",
buttonImage: "",
buttonImageOnly: !1,
buttonImageOnly: !1,
hideIfNoPrevNext: !1,
hideIfNoPrevNext: !1,
navigationAsDateFormat: !1,
navigationAsDateFormat: !1,
gotoCurrent: !1,
gotoCurrent: !1,
changeMonth: !1,
changeMonth: !1,
changeYear: !1,
changeYear: !1,
yearRange: "c-10:c+10",
yearRange: "c-10:c+10",
showOtherMonths: !1,
showOtherMonths: !1,
selectOtherMonths: !1,
selectOtherMonths: !1,
showWeek: !1,
showWeek: !1,
calculateWeek: this.iso8601Week,
calculateWeek: this.iso8601Week,
shortYearCutoff: "+10",
shortYearCutoff: "+10",
minDate: null,
minDate: null,
maxDate: null,
maxDate: null,
duration: "fast",
duration: "fast",
beforeShowDay: null,
beforeShowDay: null,
beforeShow: null,
beforeShow: null,
onSelect: null,
onSelect: null,
onChangeMonthYear: null,
onChangeMonthYear: null,
onClose: null,
onClose: null,
numberOfMonths: 1,
numberOfMonths: 1,
showCurrentAtPos: 0,
showCurrentAtPos: 0,
stepMonths: 1,
stepMonths: 1,
stepBigMonths: 12,
stepBigMonths: 12,
altField: "",
altField: "",
altFormat: "",
altFormat: "",
constrainInput: !0,
constrainInput: !0,
showButtonPanel: !1,
showButtonPanel: !1,
autoSize: !1,
autoSize: !1,
disabled: !1,
disabled: !1,
}),
}),
a.extend(this._defaults, this.regional[""]),
V.extend(this._defaults, this.regional[""]),
(this.regional.en = a.extend(!0, {}, this.regional[""])),
(this.regional.en = V.extend(!0, {}, this.regional[""])),
(this.regional["en-US"] = a.extend(!0, {}, this.regional.en)),
(this.regional["en-US"] = V.extend(!0, {}, this.regional.en)),
(this.dpDiv = d(a("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")));
(this.dpDiv = a(V("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")));
}
}
function d(b) {
function a(e) {
var c = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
var t = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
return b
return e
.on("mouseout", c, function () {
.on("mouseout", t, function () {
a(this).removeClass("ui-state-hover"),
V(this).removeClass("ui-state-hover"),
this.className.indexOf("ui-datepicker-prev") !== -1 && a(this).removeClass("ui-datepicker-prev-hover"),
-1 !== this.className.indexOf("ui-datepicker-prev") && V(this).removeClass("ui-datepicker-prev-hover"),
this.className.indexOf("ui-datepicker-next") !== -1 && a(this).removeClass("ui-datepicker-next-hover");
-1 !== this.className.indexOf("ui-datepicker-next") && V(this).removeClass("ui-datepicker-next-hover");
})
})
.on("mouseover", c, e);
.on("mouseover", t, n);
}
}
function e() {
function n() {
a.datepicker._isDisabledDatepicker(g.inline ? g.dpDiv.parent()[0] : g.input[0]) ||
V.datepicker._isDisabledDatepicker((r.inline ? r.dpDiv.parent() : r.input)[0]) ||
(a(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),
(V(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),
a(this).addClass("ui-state-hover"),
V(this).addClass("ui-state-hover"),
this.className.indexOf("ui-datepicker-prev") !== -1 && a(this).addClass("ui-datepicker-prev-hover"),
-1 !== this.className.indexOf("ui-datepicker-prev") && V(this).addClass("ui-datepicker-prev-hover"),
this.className.indexOf("ui-datepicker-next") !== -1 && a(this).addClass("ui-datepicker-next-hover"));
-1 !== this.className.indexOf("ui-datepicker-next") && V(this).addClass("ui-datepicker-next-hover"));
}
}
function f(b, c) {
function o(e, t) {
a.extend(b, c);
for (var a in (V.extend(e, t), t)) null == t[a] && (e[a] = t[a]);
for (var d in c) null == c[d] && (b[d] = c[d]);
return e;
return b;
}
}
a.extend(a.ui, { datepicker: { version: "1.12.1" } });
var g;
return (
return (
a.extend(c.prototype, {
V.extend(V.ui, { datepicker: { version: "1.12.1" } }),
V.extend(e.prototype, {
markerClassName: "hasDatepicker",
markerClassName: "hasDatepicker",
maxRows: 4,
maxRows: 4,
_widgetDatepicker: function () {
_widgetDatepicker: function () {
return this.dpDiv;
return this.dpDiv;
},
},
setDefaults: function (a) {
setDefaults: function (e) {
return f(this._defaults, a || {}), this;
return o(this._defaults, e || {}), this;
},
},
_attachDatepicker: function (b, c) {
_attachDatepicker: function (e, t) {
var d, e, f;
var a,
(d = b.nodeName.toLowerCase()),
i = e.nodeName.toLowerCase(),
(e = "div" === d || "span" === d),
s = "div" === i || "span" === i;
b.id || ((this.uuid += 1), (b.id = "dp" + this.uuid)),
e.id || ((this.uuid += 1), (e.id = "dp" + this.uuid)), ((a = this._newInst(V(e), s)).settings = V.extend({}, t || {})), "input" === i ? this._connectDatepicker(e, a) : s && this._inlineDatepicker(e, a);
(f = this._newInst(a(b), e)),
(f.settings = a.extend({}, c || {})),
"input" === d ? this._connectDatepicker(b, f) : e && this._inlineDatepicker(b, f);
},
},
_newInst: function (b, c) {
_newInst: function (e, t) {
var e = b[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1");
return {
return {
id: e,
id: e[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"),
input: b,
input: e,
selectedDay: 0,
selectedDay: 0,
selectedMonth: 0,
selectedMonth: 0,
selectedYear: 0,
selectedYear: 0,
drawMonth: 0,
drawMonth: 0,
drawYear: 0,
drawYear: 0,
inline: c,
inline: t,
dpDiv: c ? d(a("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")) : this.dpDiv,
dpDiv: t ? a(V("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")) : this.dpDiv,
};
};
},
},
_connectDatepicker: function (b, c) {
_connectDatepicker: function (e, t) {
var d = a(b);
var a = V(e);
(c.append = a([])),
(t.append = V([])),
(c.trigger = a([])),
(t.trigger = V([])),
d.hasClass(this.markerClassName) ||
a.hasClass(this.markerClassName) ||
(this._attachments(d, c),
(this._attachments(a, t),
d.addClass(this.markerClassName).on("keydown", this._doKeyDown).on("keypress", this._doKeyPress).on("keyup", this._doKeyUp),
a.addClass(this.markerClassName).on("keydown", this._doKeyDown).on("keypress", this._doKeyPress).on("keyup", this._doKeyUp),
this._autoSize(c),
this._autoSize(t),
a.data(b, "datepicker", c),
V.data(e, "datepicker", t),
c.settings.disabled && this._disableDatepicker(b));
t.settings.disabled && this._disableDatepicker(e));
},
},
_attachments: function (b, c) {
_attachments: function (e, t) {
var d,
var a,
e,
i = this._get(t, "appendText"),
f,
s = this._get(t, "isRTL");
g = this._get(c, "appendText"),
t.append && t.append.remove(),
h = this._get(c, "isRTL");
i && ((t.append = V("<span>").addClass(this._appendClass).text(i)), e[s ? "before" : "after"](t.append)),
c.append && c.append.remove(),
e.off("focus", this._showDatepicker),
g && ((c.append = a("<span class='" + this._appendClass + "'>" + g + "</span>")), b[h ? "before" : "after"](c.append)),
t.trigger && t.trigger.remove(),
b.off("focus", this._showDatepicker),
("focus" !== (a = this._get(t, "showOn")) && "both" !== a) || e.on("focus", this._showDatepicker),
c.trigger && c.trigger.remove(),
("button" !== a && "both" !== a) ||
(d = this._get(c, "showOn")),
((i = this._get(t, "buttonText")),
("focus" !== d && "both" !== d) || b.on("focus", this._showDatepicker),
(a = this._get(t, "buttonImage")),
("button" !== d && "both" !== d) ||
this._get(t, "buttonImageOnly")
((e = this._get(c, "buttonText")),
? (t.trigger = V("<img>").addClass(this._triggerClass).attr({ src: a, alt: i, title: i }))
(f = this._get(c, "buttonImage")),
: ((t.trigger = V("<button type='button'>").addClass(this._triggerClass)), a ? t.trigger.html(V("<img>").attr({ src: a, alt: i, title: i })) : t.trigger.text(i)),
(c.trigger = a(
e[s ? "before" : "after"](t.trigger),
this._get(c, "buttonImageOnly")
t.trigger.on("click", function () {
? a("<img/>").addClass(this._triggerClass).attr({ src: f, alt: e, title: e })
: a("<button type='button'></button>")
.addClass(this._triggerClass)
.html(f ? a("<img/>").attr({ src: f, alt: e, title: e }) : e)
)),
b[h ? "before" : "after"](c.trigger),
c.trigger.on("click", function () {
return (
return (
a.datepicker._datepickerShowing && a.datepicker._lastInput === b[0]
V.datepicker._datepickerShowing && V.datepicker._lastInput === e[0]
? a.datepicker._hideDatepicker()
? V.datepicker._hideDatepicker()
: a.datepicker._datepickerShowing && a.datepicker._lastInput !== b[0]
: (V.datepicker._datepickerShowing && V.datepicker._lastInput !== e[0] && V.datepicker._hideDatepicker(), V.datepicker._showDatepicker(e[0])),
? (a.datepicker._hideDatepicker(), a.datepicker._showDatepicker(b[0]))
: a.datepicker._showDatepicker(b[0]),
!1
!1
);
);
}));
}));
},
},
_autoSize: function (a) {
_autoSize: function (e) {
if (this._get(a, "autoSize") && !a.inline) {
var t, a, i, s, r, n;
var b,
this._get(e, "autoSize") &&
c,
!e.inline &&
d,
((r = new Date(2009, 11, 20)),
e,
(n = this._get(e, "dateFormat")).match(/[DM]/) &&
f = new Date(2009, 11, 20),
((t = function (e) {
g = this._get(a, "dateFormat");
for (s = i = a = 0; s < e.length; s++) e[s].length > a && ((a = e[s].length), (i = s));
g.match(/[DM]/) &&
return i;
((b = function (a) {
for (c = 0, d = 0, e = 0; e < a.length; e++) a[e].length > c && ((c = a[e].length), (d = e));
return d;
}),
}),
f.setMonth(b(this._get(a, g.match(/MM/) ? "monthNames" : "monthNamesShort"))),
r.setMonth(t(this._get(e, n.match(/MM/) ? "monthNames" : "monthNamesShort"))),
f.setDate(b(this._get(a, g.match(/DD/) ? "dayNames" : "dayNamesShort")) + 20 - f.getDay())),
r.setDate(t(this._get(e, n.match(/DD/) ? "dayNames" : "dayNamesShort")) + 20 - r.getDay())),
a.input.attr("size", this._formatDate(a, f).length);
e.input.attr("size", this._formatDate(e, r).length));
}
},
},
_inlineDatepicker: function (b, c) {
_inlineDatepicker: function (e, t) {
var d = a(b);
var a = V(e);
d.hasClass(this.markerClassName) ||
a.hasClass(this.markerClassName) ||
(d.addClass(this.markerClassName).append(c.dpDiv),
(a.addClass(this.markerClassName).append(t.dpDiv),
a.data(b, "datepicker", c),
V.data(e, "datepicker", t),
this._setDate(c, this._getDefaultDate(c), !0),
this._setDate(t, this._getDefaultDate(t), !0),
this._updateDatepicker(c),
this._updateDatepicker(t),
this._updateAlternate(c),
this._updateAlternate(t),
c.settings.disabled && this._disableDatepicker(b),
t.settings.disabled && this._disableDatepicker(e),
c.dpDiv.css("display", "block"));
t.dpDiv.css("display", "block"));
},
},
_dialogDatepicker: function (b, c, d, e, g) {
_dialogDatepicker: function (e, t, a, i, s) {
var h,
var r,
i,
n = this._dialogInst;
j,
k,
l,
m = this._dialogInst;
return (
return (
m ||
n ||
((this.uuid += 1),
((this.uuid += 1),
(h = "dp" + this.uuid),
(r = "dp" + this.uuid),
(this._dialogInput = a("<input type='text' id='" + h + "' style='position: absolute; top: -100px; width: 0px;'/>")),
(this._dialogInput = V("<input type='text' id='" + r + "' style='position: absolute; top: -100px; width: 0px;'/>")),
this._dialogInput.on("keydown", this._doKeyDown),
this._dialogInput.on("keydown", this._doKeyDown),
a("body").append(this._dialogInput),
V("body").append(this._dialogInput),
(m = this._dialogInst = this._newInst(this._dialogInput, !1)),
((n = this._dialogInst = this._newInst(this._dialogInput, !1)).settings = {}),
(m.settings = {}),
V.data(this._dialogInput[0], "datepicker", n)),
a.data(this._dialogInput[0], "datepicker", m)),
o(n.settings, i || {}),
f(m.settings, e || {}),
(t = t && t.constructor === Date ? this._formatDate(n, t) : t),
(c = c && c.constructor === Date ? this._formatDate(m, c) : c),
this._dialogInput.val(t),
this._dialogInput.val(c),
(this._pos = s ? (s.length ? s : [s.pageX, s.pageY]) : null),
(this._pos = g ? (g.length ? g : [g.pageX, g.pageY]) : null),
this._pos ||
this._pos ||
((i = document.documentElement.clientWidth),
((r = document.documentElement.clientWidth),
(j = document.documentElement.clientHeight),
(i = document.documentElement.clientHeight),
(k = document.documentElement.scrollLeft || document.body.scrollLeft),
(t = document.documentElement.scrollLeft || document.body.scrollLeft),
(l = document.documentElement.scrollTop || document.body.scrollTop),
(s = document.documentElement.scrollTop || document.body.scrollTop),
(this._pos = [i / 2 - 100 + k, j / 2 - 150 + l])),
(this._pos = [r / 2 - 100 + t, i / 2 - 150 + s])),
this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px"),
this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px"),
(m.settings.onSelect = d),
(n.settings.onSelect = a),
(this._inDialog = !0),
(this._inDialog = !0),
this.dpDiv.addClass(this._dialogClass),
this.dpDiv.addClass(this._dialogClass),
this._showDatepicker(this._dialogInput[0]),
this._showDatepicker(this._dialogInput[0]),
a.blockUI && a.blockUI(this.dpDiv),
V.blockUI && V.blockUI(this.dpDiv),
a.data(this._dialogInput[0], "datepicker", m),
V.data(this._dialogInput[0], "datepicker", n),
this
this
);
);
},
},
_destroyDatepicker: function (b) {
_destroyDatepicker: function (e) {
var c,
var t,
d = a(b),
a = V(e),
e = a.data(b, "datepicker");
i = V.data(e, "datepicker");
d.hasClass(this.markerClassName) &&
a.hasClass(this.markerClassName) &&
((c = b.nodeName.toLowerCase()),
((t = e.nodeName.toLowerCase()),
a.removeData(b, "datepicker"),
V.removeData(e, "datepicker"),
"input" === c
"input" === t
? (e.append.remove(), e.trigger.remove(), d.removeClass(this.markerClassName).off("focus", this._showDatepicker).off("keydown", this._doKeyDown).off("keypress", this._doKeyPress).off("keyup", this._doKeyUp))
? (i.append.remove(), i.trigger.remove(), a.removeClass(this.markerClassName).off("focus", this._showDatepicker).off("keydown", this._doKeyDown).off("keypress", this._doKeyPress).off("keyup", this._doKeyUp))
: ("div" !== c && "span" !== c) || d.removeClass(this.markerClassName).empty(),
: ("div" !== t && "span" !== t) || a.removeClass(this.markerClassName).empty(),
g === e && (g = null));
r === i && (r = null));
},
},
_enableDatepicker: function (b) {
_enableDatepicker: function (t) {
var c,
var e,
d,
a = V(t),
e = a(b),
i = V.data(t, "datepicker");
f = a.data(b, "datepicker");
a.hasClass(this.markerClassName) &&
e.hasClass(this.markerClassName) &&
("input" === (e = t.nodeName.toLowerCase())
((c = b.nodeName.toLowerCase()),
? ((t.disabled = !1),
"input" === c
i.trigger
? ((b.disabled = !1),
f.trigger
.filter("button")
.filter("button")
.each(function () {
.each(function () {
this.disabled = !1;
this.disabled = !1;
})
})
.end()
.end()
.filter("img")
.filter("img")
.css({ opacity: "1.0", cursor: "" }))
.css({ opacity: "1.0", cursor: "" }))
: ("div" !== c && "span" !== c) || ((d = e.children("." + this._inlineClass)), d.children().removeClass("ui-state-disabled"), d.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !1)),
: ("div" !== e && "span" !== e) || ((a = a.children("." + this._inlineClass)).children().removeClass("ui-state-disabled"), a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !1)),
(this._disabledInputs = a.map(this._disabledInputs, function (a) {
(this._disabledInputs = V.map(this._disabledInputs, function (e) {
return a === b ? null : a;
return e === t ? null : e;
})));
})));
},
},
_disableDatepicker: function (b) {
_disableDatepicker: function (t) {
var c,
var e,
d,
a = V(t),
e = a(b),
i = V.data(t, "datepicker");
f = a.data(b, "datepicker");
a.hasClass(this.markerClassName) &&
e.hasClass(this.markerClassName) &&
("input" === (e = t.nodeName.toLowerCase())
((c = b.nodeName.toLowerCase()),
? ((t.disabled = !0),
"input" === c
i.trigger
? ((b.disabled = !0),
f.trigger
.filter("button")
.filter("button")
.each(function () {
.each(function () {
this.disabled = !0;
this.disabled = !0;
})
})
.end()
.end()
.filter("img")
.filter("img")
.css({ opacity: "0.5", cursor: "default" }))
.css({ opacity: "0.5", cursor: "default" }))
: ("div" !== c && "span" !== c) || ((d = e.children("." + this._inlineClass)), d.children().addClass("ui-state-disabled"), d.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !0)),
: ("div" !== e && "span" !== e) || ((a = a.children("." + this._inlineClass)).children().addClass("ui-state-disabled"), a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !0)),
(this._disabledInputs = a.map(this._disabledInputs, function (a) {
(this._disabledInputs = V.map(this._disabledInputs, function (e) {
return a === b ? null : a;
return e === t ? null : e;
})),
})),
(this._disabledInputs[this._disabledInputs.length] = b));
(this._disabledInputs[this._disabledInputs.length] = t));
},
},
_isDisabledDatepicker: function (a) {
_isDisabledDatepicker: function (e) {
if (!a) return !1;
if (!e) return !1;
for (var b = 0; b < this._disabledInputs.length; b++) if (this._disabledInputs[b] === a) return !0;
for (var t = 0; t < this._disabledInputs.length; t++) if (this._disabledInputs[t] === e) return !0;
return !1;
return !1;
},
},
_getInst: function (b) {
_getInst: function (e) {
try {
try {
return a.data(b, "datepicker");
return V.data(e, "datepicker");
} catch (c) {
} catch (e) {
throw "Missing instance data for this datepicker";
throw "Missing instance data for this datepicker";
}
}
},
},
_optionDatepicker: function (b, c, d) {
_optionDatepicker: function (e, t, a) {
var e,
var i,
g,
s,
h,
r,
i,
n,
j = this._getInst(b);
d = this._getInst(e);
return 2 === arguments.length && "string" == typeof c
if (2 === arguments.length && "string" == typeof t) return "defaults" === t ? V.extend({}, V.datepicker._defaults) : d ? ("all" === t ? V.extend({}, d.settings) : this._get(d, t)) : null;
? "defaults" === c
(i = t || {}),
? a.extend({}, a.datepicker._defaults)
"string" == typeof t && ((i = {})[t] = a),
: j
d &&
? "all" === c
(this._curInst === d && this._hideDatepicker(),
? a.extend({}, j.settings)
(s = this._getDateDatepicker(e, !0)),
: this._get(j, c)
(r = this._getMinMaxDate(d, "min")),
: null
(n = this._getMinMaxDate(d, "max")),
: ((e = c || {}),
o(d.settings, i),
"string" == typeof c && ((e = {}), (e[c] = d)),
null !== r && void 0 !== i.dateFormat && void 0 === i.minDate && (d.settings.minDate = this._formatDate(d, r)),
void (
null !== n && void 0 !== i.dateFormat && void 0 === i.maxDate && (d.settings.maxDate = this._formatDate(d, n)),
j &&
"disabled" in i && (i.disabled ? this._disableDatepicker(e) : this._enableDatepicker(e)),
(this._curInst === j && this._hideDatepicker(),
this._attachments(V(e), d),
(g = this._getDateDatepicker(b, !0)),
this._autoSize(d),
(h = this._getMinMaxDate(j, "min")),
this._setDate(d, s),
(i = this._getMinMaxDate(j, "max")),
this._updateAlternate(d),
f(j.settings, e),
this._updateDatepicker(d));
null !== h && void 0 !== e.dateFormat && void 0 === e.minDate && (j.settings.minDate = this._formatDate(j, h)),
null !== i && void 0 !== e.dateFormat && void 0 === e.maxDate && (j.settings.maxDate = this._formatDate(j, i)),
"disabled" in e && (e.disabled ? this._disableDatepicker(b) : this._enableDatepicker(b)),
this._attachments(a(b), j),
this._autoSize(j),
this._setDate(j, g),
this._updateAlternate(j),
this._updateDatepicker(j))
));
},
},
_changeDatepicker: function (a, b, c) {
_changeDatepicker: function (e, t, a) {
this._optionDatepicker(a, b, c);
this._optionDatepicker(e, t, a);
},
},
_refreshDatepicker: function (a) {
_refreshDatepicker: function (e) {
var b = this._getInst(a);
e = this._getInst(e);
b && this._updateDatepicker(b);
e && this._updateDatepicker(e);
},
},
_setDateDatepicker: function (a, b) {
_setDateDatepicker: function (e, t) {
var c = this._getInst(a);
e = this._getInst(e);
c && (this._setDate(c, b), this._updateDatepicker(c), this._updateAlternate(c));
e && (this._setDate(e, t), this._updateDatepicker(e), this._updateAlternate(e));
},
},
_getDateDatepicker: function (a, b) {
_getDateDatepicker: function (e, t) {
var c = this._getInst(a);
e = this._getInst(e);
return c && !c.inline && this._setDateFromField(c, b), c ? this._getDate(c) : null;
return e && !e.inline && this._setDateFromField(e, t), e ? this._getDate(e) : null;
},
},
_doKeyDown: function (b) {
_doKeyDown: function (e) {
var c,
var t,
d,
a,
e,
i = V.datepicker._getInst(e.target),
f = a.datepicker._getInst(b.target),
s = !0,
g = !0,
r = i.dpDiv.is(".ui-datepicker-rtl");
h = f.dpDiv.is(".ui-datepicker-rtl");
if (((i._keyEvent = !0), V.datepicker._datepickerShowing))
if (((f._keyEvent = !0), a.datepicker._datepickerShowing))
switch (e.keyCode) {
switch (b.keyCode) {
case 9:
case 9:
a.datepicker._hideDatepicker(), (g = !1);
V.datepicker._hideDatepicker(), (s = !1);
break;
break;
case 13:
case 13:
return (
return (
(e = a("td." + a.datepicker._dayOverClass + ":not(." + a.datepicker._currentClass + ")", f.dpDiv)),
(a = V("td." + V.datepicker._dayOverClass + ":not(." + V.datepicker._currentClass + ")", i.dpDiv))[0] && V.datepicker._selectDay(e.target, i.selectedMonth, i.selectedYear, a[0]),
e[0] && a.datepicker._selectDay(b.target, f.selectedMonth, f.selectedYear, e[0]),
(t = V.datepicker._get(i, "onSelect")) ? ((a = V.datepicker._formatDate(i)), t.apply(i.input ? i.input[0] : null, [a, i])) : V.datepicker._hideDatepicker(),
(c = a.datepicker._get(f, "onSelect")),
c ? ((d = a.datepicker._formatDate(f)), c.apply(f.input ? f.input[0] : null, [d, f])) : a.datepicker._hideDatepicker(),
!1
!1
);
);
case 27:
case 27:
a.datepicker._hideDatepicker();
V.datepicker._hideDatepicker();
break;
break;
case 33:
case 33:
a.datepicker._adjustDate(b.target, b.ctrlKey ? -a.datepicker._get(f, "stepBigMonths") : -a.datepicker._get(f, "stepMonths"), "M");
V.datepicker._adjustDate(e.target, e.ctrlKey ? -V.datepicker._get(i, "stepBigMonths") : -V.datepicker._get(i, "stepMonths"), "M");
break;
break;
case 34:
case 34:
a.datepicker._adjustDate(b.target, b.ctrlKey ? +a.datepicker._get(f, "stepBigMonths") : +a.datepicker._get(f, "stepMonths"), "M");
V.datepicker._adjustDate(e.target, e.ctrlKey ? +V.datepicker._get(i, "stepBigMonths") : +V.datepicker._get(i, "stepMonths"), "M");
break;
break;
case 35:
case 35:
(b.ctrlKey || b.metaKey) && a.datepicker._clearDate(b.target), (g = b.ctrlKey || b.metaKey);
(e.ctrlKey || e.metaKey) && V.datepicker._clearDate(e.target), (s = e.ctrlKey || e.metaKey);
break;
break;
case 36:
case 36:
(b.ctrlKey || b.metaKey) && a.datepicker._gotoToday(b.target), (g = b.ctrlKey || b.metaKey);
(e.ctrlKey || e.metaKey) && V.datepicker._gotoToday(e.target), (s = e.ctrlKey || e.metaKey);
break;
break;
case 37:
case 37:
(b.ctrlKey || b.metaKey) && a.datepicker._adjustDate(b.target, h ? 1 : -1, "D"),
(e.ctrlKey || e.metaKey) && V.datepicker._adjustDate(e.target, r ? 1 : -1, "D"),
(g = b.ctrlKey || b.metaKey),
(s = e.ctrlKey || e.metaKey),
b.originalEvent.altKey && a.datepicker._adjustDate(b.target, b.ctrlKey ? -a.datepicker._get(f, "stepBigMonths") : -a.datepicker._get(f, "stepMonths"), "M");
e.originalEvent.altKey && V.datepicker._adjustDate(e.target, e.ctrlKey ? -V.datepicker._get(i, "stepBigMonths") : -V.datepicker._get(i, "stepMonths"), "M");
break;
break;
case 38:
case 38:
(b.ctrlKey || b.metaKey) && a.datepicker._adjustDate(b.target, -7, "D"), (g = b.ctrlKey || b.metaKey);
(e.ctrlKey || e.metaKey) && V.datepicker._adjustDate(e.target, -7, "D"), (s = e.ctrlKey || e.metaKey);
break;
break;
case 39:
case 39:
(b.ctrlKey || b.metaKey) && a.datepicker._adjustDate(b.target, h ? -1 : 1, "D"),
(e.ctrlKey || e.metaKey) && V.datepicker._adjustDate(e.target, r ? -1 : 1, "D"),
(g = b.ctrlKey || b.metaKey),
(s = e.ctrlKey || e.metaKey),
b.originalEvent.altKey && a.datepicker._adjustDate(b.target, b.ctrlKey ? +a.datepicker._get(f, "stepBigMonths") : +a.datepicker._get(f, "stepMonths"), "M");
e.originalEvent.altKey && V.datepicker._adjustDate(e.target, e.ctrlKey ? +V.datepicker._get(i, "stepBigMonths") : +V.datepicker._get(i, "stepMonths"), "M");
break;
break;
case 40:
case 40:
(b.ctrlKey || b.metaKey) && a.datepicker._adjustDate(b.target, 7, "D"), (g = b.ctrlKey || b.metaKey);
(e.ctrlKey || e.metaKey) && V.datepicker._adjustDate(e.target, 7, "D"), (s = e.ctrlKey || e.metaKey);
break;
break;
default:
default:
g = !1;
s = !1;
}
}
else 36 === b.keyCode && b.ctrlKey ? a.datepicker._showDatepicker(this) : (g = !1);
else 36 === e.keyCode && e.ctrlKey ? V.datepicker._showDatepicker(this) : (s = !1);
g && (b.preventDefault(), b.stopPropagation());
s && (e.preventDefault(), e.stopPropagation());
},
},
_doKeyPress: function (b) {
_doKeyPress: function (e) {
var c,
var t,
d,
a = V.datepicker._getInst(e.target);
e = a.datepicker._getInst(b.target);
if (V.datepicker._get(a, "constrainInput"))
if (a.datepicker._get(e, "constrainInput"))
return (t = V.datepicker._possibleChars(V.datepicker._get(a, "dateFormat"))), (a = String.fromCharCode(null == e.charCode ? e.keyCode : e.charCode)), e.ctrlKey || e.metaKey || a < " " || !t || -1 < t.indexOf(a);
return (c = a.datepicker._possibleChars(a.datepicker._get(e, "dateFormat"))), (d = String.fromCharCode(null == b.charCode ? b.keyCode : b.charCode)), b.ctrlKey || b.metaKey || d < " " || !c || c.indexOf(d) > -1;
},
},
_doKeyUp: function (b) {
_doKeyUp: function (e) {
var c,
var t = V.datepicker._getInst(e.target);
d = a.datepicker._getInst(b.target);
if (t.input.val() !== t.lastVal)
if (d.input.val() !== d.lastVal)
try {
try {
(c = a.datepicker.parseDate(a.datepicker._get(d, "dateFormat"), d.input ? d.input.val() : null, a.datepicker._getFormatConfig(d))),
V.datepicker.parseDate(V.datepicker._get(t, "dateFormat"), t.input ? t.input.val() : null, V.datepicker._getFormatConfig(t)) &&
c && (a.datepicker._setDateFromField(d), a.datepicker._updateAlternate(d), a.datepicker._updateDatepicker(d));
(V.datepicker._setDateFromField(t), V.datepicker._updateAlternate(t), V.datepicker._updateDatepicker(t));
} catch (e) {}
} catch (e) {}
return !0;
return !0;
},
},
_showDatepicker: function (c) {
_showDatepicker: function (e) {
if (((c = c.target || c), "input" !== c.nodeName.toLowerCase() && (c = a("input", c.parentNode)[0]), !a.datepicker._isDisabledDatepicker(c) && a.datepicker._lastInput !== c)) {
var t, a, i, s;
var d, e, g, h, i, j, k;
"input" !== (e = e.target || e).nodeName.toLowerCase() && (e = V("input", e.parentNode)[0]),
(d = a.datepicker._getInst(c)),
V.datepicker._isDisabledDatepicker(e) ||
a.datepicker._curInst && a.datepicker._curInst !== d && (a.datepicker._curInst.dpDiv.stop(!0, !0), d && a.datepicker._datepickerShowing && a.datepicker._hideDatepicker(a.datepicker._curInst.input[0])),
V.datepicker._lastInput === e ||
(e = a.datepicker._get(d, "beforeShow")),
((s = V.datepicker._getInst(e)),
(g = e ? e.apply(c, [c, d]) : {}),
V.datepicker._curInst && V.datepicker._curInst !== s && (V.datepicker._curInst.dpDiv.stop(!0, !0), s && V.datepicker._datepickerShowing && V.datepicker._hideDatepicker(V.datepicker._curInst.input[0])),
g !== !1 &&
!1 !== (a = (i = V.datepicker._get(s, "beforeShow")) ? i.apply(e, [e, s]) : {}) &&
(f(d.settings, g),
(o(s.settings, a),
(d.lastVal = null),
(s.lastVal = null),
(a.datepicker._lastInput = c),
(V.datepicker._lastInput = e),
a.datepicker._setDateFromField(d),
V.datepicker._setDateFromField(s),
a.datepicker._inDialog && (c.value = ""),
V.datepicker._inDialog && (e.value = ""),
a.datepicker._pos || ((a.datepicker._pos = a.datepicker._findPos(c)), (a.datepicker._pos[1] += c.offsetHeight)),
V.datepicker._pos || ((V.datepicker._pos = V.datepicker._findPos(e)), (V.datepicker._pos[1] += e.offsetHeight)),
(h = !1),
(t = !1),
a(c)
V(e)
.parents()
.parents()
.each(function () {
.each(function () {
return (h |= "fixed" === a(this).css("position")), !h;
return !(t |= "fixed" === V(this).css("position"));
}),
}),
(i = { left: a.datepicker._pos[0], top: a.datepicker._pos[1] }),
(i = { left: V.datepicker._pos[0], top: V.datepicker._pos[1] }),
(a.datepicker._pos = null),
(V.datepicker._pos = null),
d.dpDiv.empty(),
s.dpDiv.empty(),
d.dpDiv.css({ position: "absolute", display: "block", top: "-1000px" }),
s.dpDiv.css({ position: "absolute", display: "block", top: "-1000px" }),
V.datepicker._updateDatepicker(s),
(i = V.datepicker._checkOffset(s, i, t)),
s.dpDiv.css({ position: V.datepicker._inDialog && V.blockUI ? "static" : t ? "fixed" : "absolute", display: "none", left: i.left + "px", top: i.top + "px" }),
s.inline ||
((a = V.datepicker._get(s, "showAnim")),
(i = V.datepicker._get(s, "duration")),
s.dpDiv.css(
"z-index",
(function (e) {
for (var t, a; e.length && e[0] !== document; ) {
if (((t = e.css("position")), ("absolute" === t || "relative" === t || "fixed" === t) && ((a = parseInt(e.css("zIndex"), 10)), !isNaN(a) && 0 !== a))) return a;
e = e.parent();
}
return 0;
})(V(e)) + 1
),
(V.datepicker._datepickerShowing = !0),
V.effects && V.effects.effect[a] ? s.dpDiv.show(a, V.datepicker._get(s, "showOptions"), i) : s.dpDiv[a || "show"](a ? i : null),
V.datepicker._shouldFocusInput(s) && s.input.trigger("focus"),