inviton-powerduck 0.0.157 → 0.0.158
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1061,6 +1061,7 @@ import { utcEpochMilliseconds } from '../../../../common/extensions/temporal-ext
|
|
|
1061
1061
|
redrawDatePicker();
|
|
1062
1062
|
checkAndSetDefaultValue();
|
|
1063
1063
|
updateCalendarWidth();
|
|
1064
|
+
|
|
1064
1065
|
if (opt.customOpenAnimation) {
|
|
1065
1066
|
opt.customOpenAnimation.call(box.get(0), () => {
|
|
1066
1067
|
$(self).trigger('datepicker-opened', {
|
|
@@ -1955,22 +1956,18 @@ import { utcEpochMilliseconds } from '../../../../common/extensions/temporal-ext
|
|
|
1955
1956
|
showMonth(opt.month2, 'month2');
|
|
1956
1957
|
}
|
|
1957
1958
|
|
|
1958
|
-
function compare_month(
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
if (
|
|
1963
|
-
|
|
1964
|
-
|
|
1959
|
+
function compare_month(a: Temporal.PlainDateTime, b: Temporal.PlainDateTime): number {
|
|
1960
|
+
if (a.year !== b.year) {
|
|
1961
|
+
return a.year < b.year ? -1 : 1;
|
|
1962
|
+
}
|
|
1963
|
+
if (a.month !== b.month) {
|
|
1964
|
+
return a.month < b.month ? -1 : 1;
|
|
1965
|
+
}
|
|
1966
|
+
return 0;
|
|
1965
1967
|
}
|
|
1966
1968
|
|
|
1967
1969
|
function compare_day(m1: Temporal.PlainDateTime, m2: Temporal.PlainDateTime): number {
|
|
1968
|
-
|
|
1969
|
-
if (p > 0) { return 1; }
|
|
1970
|
-
|
|
1971
|
-
if (p === 0) { return 0; }
|
|
1972
|
-
|
|
1973
|
-
return -1;
|
|
1970
|
+
return Temporal.PlainDate.compare(m1.toPlainDate(), m2.toPlainDate());
|
|
1974
1971
|
}
|
|
1975
1972
|
|
|
1976
1973
|
function nextMonth(month: Temporal.PlainDateTime): Temporal.PlainDateTime {
|
|
@@ -2328,6 +2325,7 @@ import { utcEpochMilliseconds } from '../../../../common/extensions/temporal-ext
|
|
|
2328
2325
|
valid,
|
|
2329
2326
|
});
|
|
2330
2327
|
}
|
|
2328
|
+
|
|
2331
2329
|
const html = [];
|
|
2332
2330
|
for (let week = 0; week < 6; week++) {
|
|
2333
2331
|
if (days[week * 7].type == 'nextMonth') {
|
|
@@ -2339,7 +2337,7 @@ import { utcEpochMilliseconds } from '../../../../common/extensions/temporal-ext
|
|
|
2339
2337
|
for (var day: any = 0; day < 7; day++) {
|
|
2340
2338
|
const _day: any = (opt.startOfWeek == 'monday') ? day + 1 : day;
|
|
2341
2339
|
const today = days[week * 7 + _day];
|
|
2342
|
-
const highlightToday =
|
|
2340
|
+
const highlightToday = (Temporal.PlainDateTime.compare(today.date.toPlainDate(), now.toPlainDate()) == 0);
|
|
2343
2341
|
today.extraClass = '';
|
|
2344
2342
|
today.tooltip = '';
|
|
2345
2343
|
|