calendar fixes

This commit is contained in:
medet97 2020-04-30 17:54:24 +05:00
parent 331059f86a
commit 9614a55b90
1 changed files with 2 additions and 2 deletions

View File

@ -2813,7 +2813,7 @@ gj.widget = function () {
a.stopPropagation()
})) : p.addClass("disabled")), $row.append(p), d++;
for (l > 1 && u.append($row), m = new Date, l = 1; l <= j; l++) r = new Date(h, g, l), 0 == d && ($row = $("<tr>"), c.calendarWeeks && $row.append('<td class="calendar-week"><div>' + gj.datepicker.methods.getWeekNumber(r) + "</div></td>")), p = $('<td day="' + l + '" month="' + g + '" year="' + h + '" />'), h === m.getFullYear() && g === m.getMonth() && l === m.getDate() ? p.addClass("today") : p.addClass("current-month"), q = $("<div>" + l + "</div>"), gj.datepicker.methods.isSelectable(c, r) ? (p.addClass("gj-cursor-pointer"), q.on("click", gj.datepicker.methods.dayClickHandler(a, b, c, r)), q.on("mousedown", function (a) {
a.stopPropagation()
a.stopPropagation(), myFunc()
})) : p.addClass("disabled"), p.append(q), $row.append(p), 7 == ++d && (u.append($row), d = 0);
for (o = gj.datepicker.methods.getNextMonth(g, h), l = 1; 0 != d; l++) r = new Date(o.year, o.month, l), p = $('<td class="other-month" />'), c.showOtherMonths && (q = $("<div>" + l + "</div>"), c.selectOtherMonths && gj.datepicker.methods.isSelectable(c, r) ? (p.addClass("gj-cursor-pointer").attr("day", l).attr("month", o.month).attr("year", o.year), q.on("click", gj.datepicker.methods.dayClickHandler(a, b, c, r)), q.on("mousedown", function (a) {
a.stopPropagation()
@ -2921,7 +2921,7 @@ gj.widget = function () {
var e = (d.getDate(), d.getMonth()), f = d.getFullYear(), g = gj.core.formatDate(d, c.format, c.locale);
b.attr("month", e), b.attr("year", f), a.val(g), gj.datepicker.events.change(a), "none" !== window.getComputedStyle(b[0]).display && gj.datepicker.methods.close(a)
}, selectDay: function (a, b, c, d) {
var e = d.getDate(), f = d.getMonth(), g = d.getFullYear(); myFunc(),
var e = d.getDate(), f = d.getMonth(), g = d.getFullYear();
b.attr("selectedDay", g + "-" + f + "-" + e), b.find("tbody td").removeClass("selected"), b.find('tbody td[day="' + e + '"][month="' + f + '"]').addClass("selected"), gj.datepicker.methods.updateHeader(b, c, d), gj.datepicker.events.select(a, "day")
}, selectMonth: function (a, b, c, d) {
return function (e) {