@syncfusion/ej2-calendars 26.2.11 → 27.1.48
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.
- package/README.md +24 -24
- package/dist/ej2-calendars.min.js +2 -2
- package/dist/ej2-calendars.umd.min.js +2 -2
- package/dist/ej2-calendars.umd.min.js.map +1 -1
- package/dist/es6/ej2-calendars.es2015.js +154 -37
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +154 -37
- package/dist/es6/ej2-calendars.es5.js.map +1 -1
- package/dist/global/ej2-calendars.min.js +2 -2
- package/dist/global/ej2-calendars.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -11
- package/src/calendar/calendar.js +25 -9
- package/src/datepicker/datepicker.d.ts +1 -0
- package/src/datepicker/datepicker.js +15 -5
- package/src/daterangepicker/daterangepicker.js +2 -2
- package/src/datetimepicker/datetimepicker-model.d.ts +14 -0
- package/src/datetimepicker/datetimepicker.d.ts +13 -0
- package/src/datetimepicker/datetimepicker.js +111 -20
- package/src/timepicker/timepicker.js +1 -1
- package/styles/bootstrap-dark-lite.css +2245 -0
- package/styles/bootstrap-dark-lite.scss +19 -0
- package/styles/bootstrap-dark.css +2261 -1747
- package/styles/bootstrap-dark.scss +6 -2
- package/styles/bootstrap-lite.css +2252 -0
- package/styles/bootstrap-lite.scss +19 -0
- package/styles/bootstrap.css +2261 -1741
- package/styles/bootstrap.scss +6 -2
- package/styles/bootstrap4-lite.css +2273 -0
- package/styles/bootstrap4-lite.scss +19 -0
- package/styles/bootstrap4.css +2278 -1758
- package/styles/bootstrap4.scss +6 -2
- package/styles/bootstrap5-dark-lite.css +2382 -0
- package/styles/bootstrap5-dark-lite.scss +19 -0
- package/styles/bootstrap5-dark.css +2350 -1827
- package/styles/bootstrap5-dark.scss +6 -2
- package/styles/bootstrap5-lite.css +2382 -0
- package/styles/bootstrap5-lite.scss +19 -0
- package/styles/bootstrap5.3-lite.css +2363 -0
- package/styles/bootstrap5.3-lite.scss +19 -0
- package/styles/bootstrap5.3.css +3725 -0
- package/styles/bootstrap5.3.scss +24 -0
- package/styles/bootstrap5.css +2351 -1828
- package/styles/bootstrap5.scss +6 -2
- package/styles/calendar/_bigger.scss +1142 -0
- package/styles/calendar/_bootstrap5.3-definition.scss +7 -3
- package/styles/calendar/_fluent-definition.scss +4 -2
- package/styles/calendar/_fluent2-definition.scss +9 -5
- package/styles/calendar/_layout.scss +7 -251
- package/styles/calendar/_theme.scss +32 -8
- package/styles/calendar/bootstrap-dark.css +681 -369
- package/styles/calendar/bootstrap-dark.scss +1 -0
- package/styles/calendar/bootstrap.css +681 -369
- package/styles/calendar/bootstrap.scss +1 -0
- package/styles/calendar/bootstrap4.css +681 -369
- package/styles/calendar/bootstrap4.scss +1 -0
- package/styles/calendar/bootstrap5-dark.css +704 -390
- package/styles/calendar/bootstrap5-dark.scss +1 -0
- package/styles/calendar/bootstrap5.3.css +1238 -0
- package/styles/calendar/bootstrap5.3.scss +6 -0
- package/styles/calendar/bootstrap5.css +704 -390
- package/styles/calendar/bootstrap5.scss +1 -0
- package/styles/calendar/fabric-dark.css +689 -371
- package/styles/calendar/fabric-dark.scss +1 -0
- package/styles/calendar/fabric.css +693 -373
- package/styles/calendar/fabric.scss +1 -0
- package/styles/calendar/fluent-dark.css +806 -420
- package/styles/calendar/fluent-dark.scss +1 -0
- package/styles/calendar/fluent.css +806 -420
- package/styles/calendar/fluent.scss +1 -0
- package/styles/calendar/fluent2.css +841 -423
- package/styles/calendar/fluent2.scss +1 -0
- package/styles/calendar/highcontrast-light.css +683 -369
- package/styles/calendar/highcontrast-light.scss +1 -0
- package/styles/calendar/highcontrast.css +693 -373
- package/styles/calendar/highcontrast.scss +1 -0
- package/styles/calendar/material-dark.css +693 -373
- package/styles/calendar/material-dark.scss +1 -0
- package/styles/calendar/material.css +693 -373
- package/styles/calendar/material.scss +1 -0
- package/styles/calendar/material3-dark.css +700 -376
- package/styles/calendar/material3-dark.scss +1 -0
- package/styles/calendar/material3.css +700 -376
- package/styles/calendar/material3.scss +1 -0
- package/styles/calendar/tailwind-dark.css +748 -421
- package/styles/calendar/tailwind-dark.scss +1 -0
- package/styles/calendar/tailwind.css +748 -421
- package/styles/calendar/tailwind.scss +1 -0
- package/styles/datepicker/_bigger.scss +82 -0
- package/styles/datepicker/_bootstrap5.3-definition.scss +7 -6
- package/styles/datepicker/_fluent2-definition.scss +2 -2
- package/styles/datepicker/_layout.scss +43 -26
- package/styles/datepicker/_theme.scss +2 -7
- package/styles/datepicker/bootstrap-dark.css +33 -43
- package/styles/datepicker/bootstrap-dark.scss +1 -0
- package/styles/datepicker/bootstrap.css +33 -43
- package/styles/datepicker/bootstrap.scss +1 -0
- package/styles/datepicker/bootstrap4.css +35 -45
- package/styles/datepicker/bootstrap4.scss +1 -0
- package/styles/datepicker/bootstrap5-dark.css +35 -45
- package/styles/datepicker/bootstrap5-dark.scss +1 -0
- package/styles/datepicker/bootstrap5.3.css +453 -0
- package/styles/datepicker/bootstrap5.3.scss +8 -0
- package/styles/datepicker/bootstrap5.css +35 -45
- package/styles/datepicker/bootstrap5.scss +1 -0
- package/styles/datepicker/fabric-dark.css +33 -43
- package/styles/datepicker/fabric-dark.scss +1 -0
- package/styles/datepicker/fabric.css +33 -43
- package/styles/datepicker/fabric.scss +1 -0
- package/styles/datepicker/fluent-dark.css +35 -45
- package/styles/datepicker/fluent-dark.scss +1 -0
- package/styles/datepicker/fluent.css +35 -45
- package/styles/datepicker/fluent.scss +1 -0
- package/styles/datepicker/fluent2.css +40 -52
- package/styles/datepicker/fluent2.scss +1 -0
- package/styles/datepicker/highcontrast-light.css +33 -43
- package/styles/datepicker/highcontrast-light.scss +1 -0
- package/styles/datepicker/highcontrast.css +33 -43
- package/styles/datepicker/highcontrast.scss +1 -0
- package/styles/datepicker/icons/_bds.scss +0 -24
- package/styles/datepicker/icons/_bootstrap-dark.scss +0 -24
- package/styles/datepicker/icons/_bootstrap.scss +0 -22
- package/styles/datepicker/icons/_bootstrap4.scss +0 -24
- package/styles/datepicker/icons/_bootstrap5.3.scss +0 -24
- package/styles/datepicker/icons/_bootstrap5.scss +0 -24
- package/styles/datepicker/icons/_fabric-dark.scss +0 -22
- package/styles/datepicker/icons/_fabric.scss +0 -22
- package/styles/datepicker/icons/_fluent.scss +0 -24
- package/styles/datepicker/icons/_fluent2.scss +0 -31
- package/styles/datepicker/icons/_fusionnew.scss +0 -24
- package/styles/datepicker/icons/_highcontrast-light.scss +0 -22
- package/styles/datepicker/icons/_highcontrast.scss +0 -22
- package/styles/datepicker/icons/_material-dark.scss +0 -40
- package/styles/datepicker/icons/_material.scss +0 -40
- package/styles/datepicker/icons/_material3.scss +0 -29
- package/styles/datepicker/icons/_tailwind.scss +0 -24
- package/styles/datepicker/material-dark.css +50 -60
- package/styles/datepicker/material-dark.scss +1 -0
- package/styles/datepicker/material.css +50 -60
- package/styles/datepicker/material.scss +1 -0
- package/styles/datepicker/material3-dark.css +41 -50
- package/styles/datepicker/material3-dark.scss +1 -0
- package/styles/datepicker/material3.css +41 -50
- package/styles/datepicker/material3.scss +1 -0
- package/styles/datepicker/tailwind-dark.css +40 -50
- package/styles/datepicker/tailwind-dark.scss +1 -0
- package/styles/datepicker/tailwind.css +40 -50
- package/styles/datepicker/tailwind.scss +1 -0
- package/styles/daterangepicker/_bigger.scss +971 -0
- package/styles/daterangepicker/_bootstrap5.3-definition.scss +5 -3
- package/styles/daterangepicker/_fluent-definition.scss +0 -9
- package/styles/daterangepicker/_fluent2-definition.scss +3 -7
- package/styles/daterangepicker/_layout.scss +20 -252
- package/styles/daterangepicker/_theme.scss +20 -68
- package/styles/daterangepicker/bootstrap-dark.css +750 -540
- package/styles/daterangepicker/bootstrap-dark.scss +1 -0
- package/styles/daterangepicker/bootstrap.css +779 -563
- package/styles/daterangepicker/bootstrap.scss +1 -0
- package/styles/daterangepicker/bootstrap4.css +752 -536
- package/styles/daterangepicker/bootstrap4.scss +1 -0
- package/styles/daterangepicker/bootstrap5-dark.css +786 -570
- package/styles/daterangepicker/bootstrap5-dark.scss +1 -0
- package/styles/daterangepicker/bootstrap5.3.css +1500 -0
- package/styles/daterangepicker/bootstrap5.3.scss +8 -0
- package/styles/daterangepicker/bootstrap5.css +786 -570
- package/styles/daterangepicker/bootstrap5.scss +1 -0
- package/styles/daterangepicker/fabric-dark.css +752 -536
- package/styles/daterangepicker/fabric-dark.scss +1 -0
- package/styles/daterangepicker/fabric.css +752 -536
- package/styles/daterangepicker/fabric.scss +1 -0
- package/styles/daterangepicker/fluent-dark.css +817 -592
- package/styles/daterangepicker/fluent-dark.scss +1 -0
- package/styles/daterangepicker/fluent.css +817 -592
- package/styles/daterangepicker/fluent.scss +1 -0
- package/styles/daterangepicker/fluent2.css +791 -571
- package/styles/daterangepicker/fluent2.scss +1 -0
- package/styles/daterangepicker/highcontrast-light.css +752 -536
- package/styles/daterangepicker/highcontrast-light.scss +1 -0
- package/styles/daterangepicker/highcontrast.css +752 -536
- package/styles/daterangepicker/highcontrast.scss +1 -0
- package/styles/daterangepicker/icons/_bds.scss +0 -18
- package/styles/daterangepicker/icons/_bootstrap-dark.scss +0 -24
- package/styles/daterangepicker/icons/_bootstrap.scss +0 -16
- package/styles/daterangepicker/icons/_bootstrap4.scss +0 -19
- package/styles/daterangepicker/icons/_bootstrap5.3.scss +0 -18
- package/styles/daterangepicker/icons/_bootstrap5.scss +0 -18
- package/styles/daterangepicker/icons/_fabric-dark.scss +0 -16
- package/styles/daterangepicker/icons/_fabric.scss +0 -16
- package/styles/daterangepicker/icons/_fluent.scss +0 -18
- package/styles/daterangepicker/icons/_fluent2.scss +0 -41
- package/styles/daterangepicker/icons/_fusionnew.scss +0 -18
- package/styles/daterangepicker/icons/_highcontrast-light.scss +0 -16
- package/styles/daterangepicker/icons/_highcontrast.scss +0 -16
- package/styles/daterangepicker/icons/_material-dark.scss +0 -34
- package/styles/daterangepicker/icons/_material.scss +0 -34
- package/styles/daterangepicker/icons/_material3.scss +0 -39
- package/styles/daterangepicker/icons/_tailwind.scss +0 -18
- package/styles/daterangepicker/material-dark.css +781 -565
- package/styles/daterangepicker/material-dark.scss +1 -0
- package/styles/daterangepicker/material.css +784 -568
- package/styles/daterangepicker/material.scss +1 -0
- package/styles/daterangepicker/material3-dark.css +802 -572
- package/styles/daterangepicker/material3-dark.scss +1 -0
- package/styles/daterangepicker/material3.css +802 -572
- package/styles/daterangepicker/material3.scss +1 -0
- package/styles/daterangepicker/tailwind-dark.css +791 -559
- package/styles/daterangepicker/tailwind-dark.scss +1 -0
- package/styles/daterangepicker/tailwind.css +791 -559
- package/styles/daterangepicker/tailwind.scss +1 -0
- package/styles/datetimepicker/_bigger.scss +105 -0
- package/styles/datetimepicker/_layout.scss +0 -76
- package/styles/datetimepicker/bootstrap-dark.css +42 -42
- package/styles/datetimepicker/bootstrap-dark.scss +1 -0
- package/styles/datetimepicker/bootstrap.css +42 -42
- package/styles/datetimepicker/bootstrap.scss +1 -0
- package/styles/datetimepicker/bootstrap4.css +42 -42
- package/styles/datetimepicker/bootstrap4.scss +1 -0
- package/styles/datetimepicker/bootstrap5-dark.css +42 -42
- package/styles/datetimepicker/bootstrap5-dark.scss +1 -0
- package/styles/datetimepicker/bootstrap5.3.css +227 -0
- package/styles/datetimepicker/bootstrap5.3.scss +9 -0
- package/styles/datetimepicker/bootstrap5.css +42 -42
- package/styles/datetimepicker/bootstrap5.scss +1 -0
- package/styles/datetimepicker/fabric-dark.css +42 -42
- package/styles/datetimepicker/fabric-dark.scss +1 -0
- package/styles/datetimepicker/fabric.css +42 -42
- package/styles/datetimepicker/fabric.scss +1 -0
- package/styles/datetimepicker/fluent-dark.css +42 -42
- package/styles/datetimepicker/fluent-dark.scss +1 -0
- package/styles/datetimepicker/fluent.css +42 -42
- package/styles/datetimepicker/fluent.scss +1 -0
- package/styles/datetimepicker/fluent2.css +42 -42
- package/styles/datetimepicker/fluent2.scss +1 -0
- package/styles/datetimepicker/highcontrast-light.css +42 -42
- package/styles/datetimepicker/highcontrast-light.scss +1 -0
- package/styles/datetimepicker/highcontrast.css +42 -42
- package/styles/datetimepicker/highcontrast.scss +1 -0
- package/styles/datetimepicker/icons/_material-dark.scss +0 -22
- package/styles/datetimepicker/icons/_material.scss +0 -22
- package/styles/datetimepicker/material-dark.css +66 -66
- package/styles/datetimepicker/material-dark.scss +1 -0
- package/styles/datetimepicker/material.css +66 -66
- package/styles/datetimepicker/material.scss +1 -0
- package/styles/datetimepicker/material3-dark.css +53 -53
- package/styles/datetimepicker/material3-dark.scss +1 -0
- package/styles/datetimepicker/material3.css +53 -53
- package/styles/datetimepicker/material3.scss +1 -0
- package/styles/datetimepicker/tailwind-dark.css +42 -42
- package/styles/datetimepicker/tailwind-dark.scss +1 -0
- package/styles/datetimepicker/tailwind.css +42 -42
- package/styles/datetimepicker/tailwind.scss +1 -0
- package/styles/fabric-dark-lite.css +2251 -0
- package/styles/fabric-dark-lite.scss +19 -0
- package/styles/fabric-dark.css +2268 -1742
- package/styles/fabric-dark.scss +6 -2
- package/styles/fabric-lite.css +2255 -0
- package/styles/fabric-lite.scss +19 -0
- package/styles/fabric.css +2265 -1737
- package/styles/fabric.scss +6 -2
- package/styles/fluent-dark-lite.css +2509 -0
- package/styles/fluent-dark-lite.scss +19 -0
- package/styles/fluent-dark.css +2456 -1853
- package/styles/fluent-dark.scss +6 -2
- package/styles/fluent-lite.css +2509 -0
- package/styles/fluent-lite.scss +19 -0
- package/styles/fluent.css +2456 -1853
- package/styles/fluent.scss +6 -2
- package/styles/fluent2-lite.css +2606 -0
- package/styles/fluent2-lite.scss +19 -0
- package/styles/fluent2.css +2410 -1781
- package/styles/fluent2.scss +6 -2
- package/styles/highcontrast-light-lite.css +2259 -0
- package/styles/highcontrast-light-lite.scss +19 -0
- package/styles/highcontrast-light.css +2264 -1742
- package/styles/highcontrast-light.scss +6 -2
- package/styles/highcontrast-lite.css +2268 -0
- package/styles/highcontrast-lite.scss +19 -0
- package/styles/highcontrast.css +2273 -1745
- package/styles/highcontrast.scss +6 -2
- package/styles/material-dark-lite.css +2345 -0
- package/styles/material-dark-lite.scss +19 -0
- package/styles/material-dark.css +2371 -1843
- package/styles/material-dark.scss +6 -2
- package/styles/material-lite.css +2375 -0
- package/styles/material-lite.scss +19 -0
- package/styles/material.css +2363 -1835
- package/styles/material.scss +6 -2
- package/styles/material3-dark-lite.css +2400 -0
- package/styles/material3-dark-lite.scss +19 -0
- package/styles/material3-dark.css +2414 -1867
- package/styles/material3-dark.scss +6 -2
- package/styles/material3-lite.css +2402 -0
- package/styles/material3-lite.scss +19 -0
- package/styles/material3.css +2414 -1867
- package/styles/material3.scss +6 -2
- package/styles/tailwind-dark-lite.css +2327 -0
- package/styles/tailwind-dark-lite.scss +19 -0
- package/styles/tailwind-dark.css +2362 -1811
- package/styles/tailwind-dark.scss +6 -2
- package/styles/tailwind-lite.css +2327 -0
- package/styles/tailwind-lite.scss +19 -0
- package/styles/tailwind.css +2363 -1812
- package/styles/tailwind.scss +6 -2
- package/styles/timepicker/_bigger.scss +92 -0
- package/styles/timepicker/_layout.scss +0 -62
- package/styles/timepicker/_theme.scss +2 -4
- package/styles/timepicker/bootstrap-dark.css +44 -41
- package/styles/timepicker/bootstrap-dark.scss +1 -0
- package/styles/timepicker/bootstrap.css +44 -41
- package/styles/timepicker/bootstrap.scss +1 -0
- package/styles/timepicker/bootstrap4.css +44 -41
- package/styles/timepicker/bootstrap4.scss +1 -0
- package/styles/timepicker/bootstrap5-dark.css +44 -41
- package/styles/timepicker/bootstrap5-dark.scss +1 -0
- package/styles/timepicker/bootstrap5.3.css +327 -0
- package/styles/timepicker/bootstrap5.3.scss +7 -0
- package/styles/timepicker/bootstrap5.css +44 -41
- package/styles/timepicker/bootstrap5.scss +1 -0
- package/styles/timepicker/fabric-dark.css +44 -41
- package/styles/timepicker/fabric-dark.scss +1 -0
- package/styles/timepicker/fabric.css +44 -41
- package/styles/timepicker/fabric.scss +1 -0
- package/styles/timepicker/fluent-dark.css +44 -41
- package/styles/timepicker/fluent-dark.scss +1 -0
- package/styles/timepicker/fluent.css +44 -41
- package/styles/timepicker/fluent.scss +1 -0
- package/styles/timepicker/fluent2.css +44 -41
- package/styles/timepicker/fluent2.scss +1 -0
- package/styles/timepicker/highcontrast-light.css +44 -41
- package/styles/timepicker/highcontrast-light.scss +1 -0
- package/styles/timepicker/highcontrast.css +44 -41
- package/styles/timepicker/highcontrast.scss +1 -0
- package/styles/timepicker/icons/_material-dark.scss +0 -15
- package/styles/timepicker/icons/_material.scss +0 -15
- package/styles/timepicker/material-dark.css +61 -58
- package/styles/timepicker/material-dark.scss +1 -0
- package/styles/timepicker/material.css +61 -58
- package/styles/timepicker/material.scss +1 -0
- package/styles/timepicker/material3-dark.css +52 -49
- package/styles/timepicker/material3-dark.scss +1 -0
- package/styles/timepicker/material3.css +52 -49
- package/styles/timepicker/material3.scss +1 -0
- package/styles/timepicker/tailwind-dark.css +44 -41
- package/styles/timepicker/tailwind-dark.scss +1 -0
- package/styles/timepicker/tailwind.css +44 -41
- package/styles/timepicker/tailwind.scss +1 -0
|
@@ -295,8 +295,8 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
295
295
|
getCultureValues() {
|
|
296
296
|
const culShortNames = [];
|
|
297
297
|
let cldrObj;
|
|
298
|
-
const dayFormat = 'days.stand-alone.' + this.dayHeaderFormat.toLowerCase();
|
|
299
|
-
if (this.locale === 'en' || this.locale === 'en-US') {
|
|
298
|
+
const dayFormat = !isNullOrUndefined(this.dayHeaderFormat) ? 'days.stand-alone.' + this.dayHeaderFormat.toLowerCase() : null;
|
|
299
|
+
if ((this.locale === 'en' || this.locale === 'en-US') && !isNullOrUndefined(dayFormat)) {
|
|
300
300
|
cldrObj = (getValue(dayFormat, getDefaultDateObject()));
|
|
301
301
|
}
|
|
302
302
|
else {
|
|
@@ -533,7 +533,12 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
533
533
|
else if (e.target === this.todayElement && !e.target.className.includes(DISABLED)) {
|
|
534
534
|
this.todayButtonClick(e, value);
|
|
535
535
|
if (this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') {
|
|
536
|
-
this.
|
|
536
|
+
if (this.isAngular) {
|
|
537
|
+
this.inputElement.focus();
|
|
538
|
+
}
|
|
539
|
+
else {
|
|
540
|
+
this.element.focus();
|
|
541
|
+
}
|
|
537
542
|
}
|
|
538
543
|
}
|
|
539
544
|
else {
|
|
@@ -544,7 +549,12 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
544
549
|
const d = new Date(parseInt('' + (element).id, 0));
|
|
545
550
|
this.selectDate(e, d, (element));
|
|
546
551
|
if (this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') {
|
|
547
|
-
this.
|
|
552
|
+
if (this.isAngular) {
|
|
553
|
+
this.inputElement.focus();
|
|
554
|
+
}
|
|
555
|
+
else {
|
|
556
|
+
this.element.focus();
|
|
557
|
+
}
|
|
548
558
|
}
|
|
549
559
|
}
|
|
550
560
|
else {
|
|
@@ -636,7 +646,12 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
636
646
|
case 'shiftTab':
|
|
637
647
|
if ((this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') && e.target === this.headerTitleElement) {
|
|
638
648
|
e.preventDefault();
|
|
639
|
-
this.
|
|
649
|
+
if (this.isAngular) {
|
|
650
|
+
this.inputElement.focus();
|
|
651
|
+
}
|
|
652
|
+
else {
|
|
653
|
+
this.element.focus();
|
|
654
|
+
}
|
|
640
655
|
this.hide();
|
|
641
656
|
}
|
|
642
657
|
break;
|
|
@@ -730,13 +745,13 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
730
745
|
tdEles = this.renderDays(this.currentDate, value, null, null, isCustomDate, e);
|
|
731
746
|
}
|
|
732
747
|
else {
|
|
733
|
-
tdEles = this.islamicModule.islamicRenderDays(this.currentDate, value);
|
|
748
|
+
tdEles = !isNullOrUndefined(this.islamicModule) ? this.islamicModule.islamicRenderDays(this.currentDate, value) : null;
|
|
734
749
|
}
|
|
735
750
|
this.createContentHeader();
|
|
736
751
|
if (this.calendarMode === 'Gregorian') {
|
|
737
752
|
this.renderTemplate(tdEles, numCells, MONTH, e, value);
|
|
738
753
|
}
|
|
739
|
-
else {
|
|
754
|
+
else if (!isNullOrUndefined(this.islamicModule)) {
|
|
740
755
|
this.islamicModule.islamicRenderTemplate(tdEles, numCells, MONTH, e, value);
|
|
741
756
|
}
|
|
742
757
|
}
|
|
@@ -1686,8 +1701,8 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
1686
1701
|
}
|
|
1687
1702
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1688
1703
|
getCultureObjects(ld, c) {
|
|
1689
|
-
const gregorianFormat = '.dates.calendars.gregorian.days.format.' + this.dayHeaderFormat.toLowerCase();
|
|
1690
|
-
const islamicFormat = '.dates.calendars.islamic.days.format.' + this.dayHeaderFormat.toLowerCase();
|
|
1704
|
+
const gregorianFormat = !isNullOrUndefined(this.dayHeaderFormat) ? '.dates.calendars.gregorian.days.format.' + this.dayHeaderFormat.toLowerCase() : null;
|
|
1705
|
+
const islamicFormat = !isNullOrUndefined(this.dayHeaderFormat) ? '.dates.calendars.islamic.days.format.' + this.dayHeaderFormat.toLowerCase() : null;
|
|
1691
1706
|
const mainVal = 'main.';
|
|
1692
1707
|
if (this.calendarMode === 'Gregorian') {
|
|
1693
1708
|
return getValue(mainVal + '' + this.locale + gregorianFormat, ld);
|
|
@@ -2644,6 +2659,7 @@ let Calendar = class Calendar extends CalendarBase {
|
|
|
2644
2659
|
if (!isNullOrUndefined(this.value)) {
|
|
2645
2660
|
this.setProperties({ value: this.value }, true);
|
|
2646
2661
|
}
|
|
2662
|
+
// eslint-disable-next-line
|
|
2647
2663
|
if (!this.isMultiSelection && +this.value !== Number.NaN && (!isNullOrUndefined(this.value) &&
|
|
2648
2664
|
!isNullOrUndefined(this.previousDate) || this.previousDate === null
|
|
2649
2665
|
&& !isNaN(+this.value))) {
|
|
@@ -3377,7 +3393,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3377
3393
|
const ariaAttrs = {
|
|
3378
3394
|
'aria-atomic': 'true', 'aria-expanded': 'false',
|
|
3379
3395
|
'role': 'combobox', 'autocomplete': 'off', 'autocorrect': 'off',
|
|
3380
|
-
'autocapitalize': 'off', 'spellcheck': 'false', 'aria-invalid': 'false'
|
|
3396
|
+
'autocapitalize': 'off', 'spellcheck': 'false', 'aria-invalid': 'false'
|
|
3381
3397
|
};
|
|
3382
3398
|
if (this.getModuleName() === 'datepicker') {
|
|
3383
3399
|
const l10nLocale = { placeholder: this.placeholder };
|
|
@@ -3415,6 +3431,9 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3415
3431
|
this.inputElement.setAttribute('name', '' + this.element.id);
|
|
3416
3432
|
}
|
|
3417
3433
|
attributes(this.inputElement, ariaAttrs);
|
|
3434
|
+
if (!this.inputElement.hasAttribute('aria-label')) {
|
|
3435
|
+
this.inputElement.setAttribute('aria-label', this.getModuleName());
|
|
3436
|
+
}
|
|
3418
3437
|
if (!this.enabled) {
|
|
3419
3438
|
this.inputElement.setAttribute('aria-disabled', 'true');
|
|
3420
3439
|
this.inputElement.tabIndex = -1;
|
|
@@ -4671,7 +4690,6 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4671
4690
|
if (this.showClearButton) {
|
|
4672
4691
|
this.clearButton = document.getElementsByClassName('e-clear-icon')[0];
|
|
4673
4692
|
}
|
|
4674
|
-
this.hide(null);
|
|
4675
4693
|
super.destroy();
|
|
4676
4694
|
Input.destroy({
|
|
4677
4695
|
element: this.inputElement,
|
|
@@ -4687,8 +4705,11 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4687
4705
|
const ariaAttrs = {
|
|
4688
4706
|
'aria-atomic': 'true', 'aria-disabled': 'true',
|
|
4689
4707
|
'aria-expanded': 'false', 'role': 'combobox', 'autocomplete': 'off',
|
|
4690
|
-
'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false'
|
|
4708
|
+
'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false'
|
|
4691
4709
|
};
|
|
4710
|
+
if (this.inputElement.hasAttribute('aria-label')) {
|
|
4711
|
+
this.inputElement.removeAttribute('aria-label');
|
|
4712
|
+
}
|
|
4692
4713
|
if (this.inputElement) {
|
|
4693
4714
|
Input.removeAttributes(ariaAttrs, this.inputElement);
|
|
4694
4715
|
if (!isNullOrUndefined(this.inputElementCopy.getAttribute('tabindex'))) {
|
|
@@ -5037,9 +5058,11 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
5037
5058
|
this.calendarElement.querySelectorAll(dateIdString)[0] &&
|
|
5038
5059
|
this.calendarElement.querySelectorAll(dateIdString)[0].classList.contains('e-disabled');
|
|
5039
5060
|
if ((!isNullOrUndefined(this.value) && !isNullOrUndefined(this.min) &&
|
|
5040
|
-
!isNullOrUndefined(this.max) && !(new Date(this.value).setMilliseconds(0) >=
|
|
5061
|
+
!isNullOrUndefined(this.max) && !(new Date(this.value).setMilliseconds(0) >=
|
|
5062
|
+
new Date(this.min).setMilliseconds(0)
|
|
5041
5063
|
&& new Date(this.value).setMilliseconds(0) <= new Date(this.max).setMilliseconds(0)))
|
|
5042
|
-
|| (!this.strictMode && this.inputElement.value !== '' && this.inputElement.value !== this.maskedDateValue &&
|
|
5064
|
+
|| (!this.strictMode && this.inputElement.value !== '' && this.inputElement.value !== this.maskedDateValue &&
|
|
5065
|
+
isNullOrUndefined(this.value) || isDisabledDate) || !this.isValidTime(this.value)) {
|
|
5043
5066
|
addClass([this.inputWrapper.container], ERROR);
|
|
5044
5067
|
attributes(this.inputElement, { 'aria-invalid': 'true' });
|
|
5045
5068
|
}
|
|
@@ -5048,6 +5071,9 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
5048
5071
|
attributes(this.inputElement, { 'aria-invalid': 'false' });
|
|
5049
5072
|
}
|
|
5050
5073
|
}
|
|
5074
|
+
isValidTime(value) {
|
|
5075
|
+
return true;
|
|
5076
|
+
}
|
|
5051
5077
|
/**
|
|
5052
5078
|
* Called internally if any of the property value changed.
|
|
5053
5079
|
*
|
|
@@ -5735,7 +5761,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5735
5761
|
processPresets() {
|
|
5736
5762
|
this.presetsItem = [];
|
|
5737
5763
|
let i = 0;
|
|
5738
|
-
if (!isUndefined(this.presets[0].start && this.presets[0].end && this.presets[0].label)) {
|
|
5764
|
+
if (!isNullOrUndefined(this.presets[0]) && !isUndefined(this.presets[0].start && this.presets[0].end && this.presets[0].label)) {
|
|
5739
5765
|
for (const range of this.presets) {
|
|
5740
5766
|
const id = range.label.replace(/\s+/g, '') + '_' + (++i);
|
|
5741
5767
|
if (typeof range.end === 'string') {
|
|
@@ -6333,7 +6359,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6333
6359
|
this.currentDate = null;
|
|
6334
6360
|
}
|
|
6335
6361
|
errorClass() {
|
|
6336
|
-
const inputStr = this.inputElement.value.trim();
|
|
6362
|
+
const inputStr = !isNullOrUndefined(this.inputElement.value) ? this.inputElement.value.trim() : null;
|
|
6337
6363
|
if (((isNullOrUndefined(this.endValue) && isNullOrUndefined(this.startValue) && inputStr !== '') ||
|
|
6338
6364
|
((!isNullOrUndefined(this.startValue) && +this.startValue < +this.min)
|
|
6339
6365
|
|| ((!isNullOrUndefined(this.startValue) && !isNullOrUndefined(this.endValue)) && +this.startValue > +this.endValue)
|
|
@@ -11078,7 +11104,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11078
11104
|
return dateVal;
|
|
11079
11105
|
}
|
|
11080
11106
|
valueIsDisable(value) {
|
|
11081
|
-
if (this.disableItemCollection.length > 0) {
|
|
11107
|
+
if (!isNullOrUndefined(this.disableItemCollection) && this.disableItemCollection.length > 0) {
|
|
11082
11108
|
if (this.disableItemCollection.length === this.timeCollections.length) {
|
|
11083
11109
|
return false;
|
|
11084
11110
|
}
|
|
@@ -12564,7 +12590,6 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
12564
12590
|
if (this.showClearButton) {
|
|
12565
12591
|
this.clearButton = document.getElementsByClassName('e-clear-icon')[0];
|
|
12566
12592
|
}
|
|
12567
|
-
this.hide(null);
|
|
12568
12593
|
if (this.popupObject && this.popupObject.element.classList.contains(POPUP$3)) {
|
|
12569
12594
|
this.popupObject.destroy();
|
|
12570
12595
|
detach(this.dateTimeWrapper);
|
|
@@ -12637,6 +12662,12 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
12637
12662
|
if (typeof (this.max) === 'string') {
|
|
12638
12663
|
this.max = this.checkDateValue(new Date(this.max));
|
|
12639
12664
|
}
|
|
12665
|
+
if (typeof (this.minTime) === 'string') {
|
|
12666
|
+
this.minTime = this.checkDateValue(new Date(this.minTime));
|
|
12667
|
+
}
|
|
12668
|
+
if (typeof (this.maxTime) === 'string') {
|
|
12669
|
+
this.maxTime = this.checkDateValue(new Date(this.maxTime));
|
|
12670
|
+
}
|
|
12640
12671
|
if (!isNullOrUndefined(closest(this.element, 'fieldset')) && closest(this.element, 'fieldset').disabled) {
|
|
12641
12672
|
this.enabled = false;
|
|
12642
12673
|
}
|
|
@@ -12707,7 +12738,7 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
12707
12738
|
checkValidState(value) {
|
|
12708
12739
|
this.isValidState = true;
|
|
12709
12740
|
if (!this.strictMode) {
|
|
12710
|
-
if ((+(value) > +(this.max)) || (+(value) < +(this.min))) {
|
|
12741
|
+
if ((+(value) > +(this.max)) || (+(value) < +(this.min)) || !this.isValidTime(value)) {
|
|
12711
12742
|
this.isValidState = false;
|
|
12712
12743
|
}
|
|
12713
12744
|
}
|
|
@@ -12722,6 +12753,54 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
12722
12753
|
}
|
|
12723
12754
|
attributes(this.inputElement, { 'aria-invalid': this.isValidState ? 'false' : 'true' });
|
|
12724
12755
|
}
|
|
12756
|
+
isValidTime(value) {
|
|
12757
|
+
if (value != null && (this.minTime || this.maxTime)) {
|
|
12758
|
+
let minTimeValue;
|
|
12759
|
+
let maxTimeValue;
|
|
12760
|
+
let maxValue;
|
|
12761
|
+
let minValue;
|
|
12762
|
+
const valueTime = value.getHours() * 3600000 + value.getMinutes() * 60000 +
|
|
12763
|
+
value.getSeconds() * 1000 + value.getMilliseconds();
|
|
12764
|
+
if (this.minTime) {
|
|
12765
|
+
minTimeValue = this.minTime.getHours() * 3600000 + this.minTime.getMinutes() * 60000 +
|
|
12766
|
+
this.minTime.getSeconds() * 1000 + this.minTime.getMilliseconds();
|
|
12767
|
+
}
|
|
12768
|
+
if (this.maxTime) {
|
|
12769
|
+
maxTimeValue = this.maxTime.getHours() * 3600000 + this.maxTime.getMinutes() * 60000 +
|
|
12770
|
+
this.maxTime.getSeconds() * 1000 + this.maxTime.getMilliseconds();
|
|
12771
|
+
}
|
|
12772
|
+
if (this.min && (+value.getDate() === +this.min.getDate() && +value.getMonth() === +this.min.getMonth() &&
|
|
12773
|
+
+value.getFullYear() === +this.min.getFullYear())) {
|
|
12774
|
+
minValue = this.min.getHours() * 3600000 + this.min.getMinutes() * 60000 +
|
|
12775
|
+
this.min.getSeconds() * 1000 + this.min.getMilliseconds();
|
|
12776
|
+
minTimeValue = minTimeValue < minValue ? minValue : minTimeValue;
|
|
12777
|
+
}
|
|
12778
|
+
if (this.max && (+value.getDate() === +this.max.getDate() && +value.getMonth() === +this.max.getMonth() &&
|
|
12779
|
+
+this.max.getFullYear() === +this.max.getFullYear())) {
|
|
12780
|
+
maxValue = this.max.getHours() * 3600000 + this.max.getMinutes() * 60000 +
|
|
12781
|
+
this.max.getSeconds() * 1000 + this.max.getMilliseconds();
|
|
12782
|
+
maxTimeValue = maxTimeValue > maxValue ? maxValue : maxTimeValue;
|
|
12783
|
+
}
|
|
12784
|
+
if (this.strictMode) {
|
|
12785
|
+
let newValue;
|
|
12786
|
+
if (minTimeValue && valueTime < minTimeValue) {
|
|
12787
|
+
newValue = new Date(value.getFullYear(), value.getMonth(), value.getDate(), this.minTime.getHours(), this.minTime.getMinutes(), this.minTime.getSeconds(), this.minTime.getMilliseconds());
|
|
12788
|
+
this.setProperties({ value: newValue }, true);
|
|
12789
|
+
this.changedArgs = { value: this.value };
|
|
12790
|
+
}
|
|
12791
|
+
else if (maxTimeValue && valueTime > maxTimeValue) {
|
|
12792
|
+
newValue = new Date(value.getFullYear(), value.getMonth(), value.getDate(), this.maxTime.getHours(), this.maxTime.getMinutes(), this.maxTime.getSeconds(), this.maxTime.getMilliseconds());
|
|
12793
|
+
this.setProperties({ value: newValue }, true);
|
|
12794
|
+
this.changedArgs = { value: this.value };
|
|
12795
|
+
}
|
|
12796
|
+
return true;
|
|
12797
|
+
}
|
|
12798
|
+
else {
|
|
12799
|
+
return !((minTimeValue && valueTime < minTimeValue) || (maxTimeValue && valueTime > maxTimeValue));
|
|
12800
|
+
}
|
|
12801
|
+
}
|
|
12802
|
+
return true;
|
|
12803
|
+
}
|
|
12725
12804
|
validateValue(value) {
|
|
12726
12805
|
let dateVal = value;
|
|
12727
12806
|
if (this.strictMode) {
|
|
@@ -12996,8 +13075,11 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
12996
13075
|
if (!Browser.isDevice || (Browser.isDevice && !this.fullScreenMode)) {
|
|
12997
13076
|
this.popupObject.refreshPosition(this.inputElement);
|
|
12998
13077
|
}
|
|
12999
|
-
if (Browser.isDevice
|
|
13000
|
-
this.
|
|
13078
|
+
if (Browser.isDevice) {
|
|
13079
|
+
this.modelWrapper.style.zIndex = (this.popupObject.zIndex - 1).toString();
|
|
13080
|
+
if (this.fullScreenMode) {
|
|
13081
|
+
this.dateTimeWrapper.style.left = '0px';
|
|
13082
|
+
}
|
|
13001
13083
|
}
|
|
13002
13084
|
}
|
|
13003
13085
|
}
|
|
@@ -13413,20 +13495,35 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13413
13495
|
let tempStartValue;
|
|
13414
13496
|
let start;
|
|
13415
13497
|
const tempMin = this.min;
|
|
13498
|
+
const tempMax = this.max;
|
|
13416
13499
|
const value = date === null ? new Date() : date;
|
|
13417
|
-
|
|
13418
|
-
|
|
13419
|
-
|
|
13500
|
+
let isModified = false;
|
|
13501
|
+
let startValue;
|
|
13502
|
+
if (this.minTime) {
|
|
13503
|
+
startValue = new Date(value.getFullYear(), value.getMonth(), value.getDate(), this.minTime.getHours(), this.minTime.getMinutes(), this.minTime.getSeconds(), this.minTime.getMilliseconds());
|
|
13504
|
+
isModified = true;
|
|
13505
|
+
}
|
|
13506
|
+
else {
|
|
13507
|
+
startValue = value;
|
|
13508
|
+
}
|
|
13509
|
+
if ((+startValue.getDate() === +tempMin.getDate() && +startValue.getMonth() === +tempMin.getMonth() &&
|
|
13510
|
+
+startValue.getFullYear() === +tempMin.getFullYear()) ||
|
|
13511
|
+
((+new Date(startValue.getFullYear(), startValue.getMonth(), startValue.getDate())) <=
|
|
13512
|
+
+new Date(tempMin.getFullYear(), tempMin.getMonth(), tempMin.getDate()))) {
|
|
13420
13513
|
start = false;
|
|
13421
|
-
tempStartValue =
|
|
13514
|
+
tempStartValue = tempMin;
|
|
13515
|
+
if (isModified && ((+new Date(startValue.getFullYear(), startValue.getMonth(), startValue.getDate(), startValue.getHours(), startValue.getMinutes(), startValue.getSeconds(), startValue.getMilliseconds())) >=
|
|
13516
|
+
+new Date(tempMin.getFullYear(), tempMin.getMonth(), tempMin.getDate(), tempMin.getHours(), tempMin.getMinutes(), tempMin.getSeconds(), tempMin.getMilliseconds()))) {
|
|
13517
|
+
tempStartValue.setHours(startValue.getHours(), startValue.getMinutes(), startValue.getSeconds(), startValue.getMilliseconds());
|
|
13518
|
+
}
|
|
13422
13519
|
}
|
|
13423
|
-
else if (+
|
|
13424
|
-
start =
|
|
13425
|
-
tempStartValue =
|
|
13520
|
+
else if (+startValue < +tempMax && +startValue > +tempMin) {
|
|
13521
|
+
start = !isModified;
|
|
13522
|
+
tempStartValue = startValue;
|
|
13426
13523
|
}
|
|
13427
|
-
else if (+
|
|
13524
|
+
else if (+startValue >= +tempMax) {
|
|
13428
13525
|
start = true;
|
|
13429
|
-
tempStartValue =
|
|
13526
|
+
tempStartValue = tempMax;
|
|
13430
13527
|
}
|
|
13431
13528
|
return this.calculateStartEnd(tempStartValue, start, 'starttime');
|
|
13432
13529
|
}
|
|
@@ -13475,17 +13572,31 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13475
13572
|
let end;
|
|
13476
13573
|
const tempMax = this.max;
|
|
13477
13574
|
const value = date === null ? new Date() : date;
|
|
13478
|
-
|
|
13479
|
-
|
|
13480
|
-
|
|
13575
|
+
let isModified = false;
|
|
13576
|
+
let endValue;
|
|
13577
|
+
if (this.maxTime) {
|
|
13578
|
+
endValue = new Date(value.getFullYear(), value.getMonth(), value.getDate(), this.maxTime.getHours(), this.maxTime.getMinutes(), this.maxTime.getSeconds(), this.maxTime.getMilliseconds());
|
|
13579
|
+
isModified = true;
|
|
13580
|
+
}
|
|
13581
|
+
else {
|
|
13582
|
+
endValue = value;
|
|
13583
|
+
}
|
|
13584
|
+
if ((+endValue.getDate() === +tempMax.getDate() && +endValue.getMonth() === +tempMax.getMonth() &&
|
|
13585
|
+
+endValue.getFullYear() === +tempMax.getFullYear()) ||
|
|
13586
|
+
(+new Date(endValue.getUTCFullYear(), endValue.getMonth(), endValue.getDate()) >=
|
|
13587
|
+
+new Date(tempMax.getFullYear(), tempMax.getMonth(), tempMax.getDate()))) {
|
|
13481
13588
|
end = false;
|
|
13482
13589
|
tempEndValue = this.max;
|
|
13590
|
+
if (isModified && (+new Date(endValue.getUTCFullYear(), endValue.getMonth(), endValue.getDate(), endValue.getHours(), endValue.getMinutes(), endValue.getSeconds(), endValue.getMilliseconds()) <=
|
|
13591
|
+
+new Date(tempMax.getFullYear(), tempMax.getMonth(), tempMax.getDate(), tempMax.getHours(), tempMax.getMinutes(), tempMax.getSeconds(), tempMax.getMilliseconds()))) {
|
|
13592
|
+
tempEndValue.setHours(endValue.getHours(), endValue.getMinutes(), endValue.getSeconds(), endValue.getMilliseconds());
|
|
13593
|
+
}
|
|
13483
13594
|
}
|
|
13484
|
-
else if (+
|
|
13485
|
-
end =
|
|
13486
|
-
tempEndValue =
|
|
13595
|
+
else if (+endValue < +this.max && +endValue > +this.min) {
|
|
13596
|
+
end = !isModified;
|
|
13597
|
+
tempEndValue = endValue;
|
|
13487
13598
|
}
|
|
13488
|
-
else if (+
|
|
13599
|
+
else if (+endValue <= +this.min) {
|
|
13489
13600
|
end = true;
|
|
13490
13601
|
tempEndValue = this.min;
|
|
13491
13602
|
}
|
|
@@ -14086,6 +14197,12 @@ __decorate$4([
|
|
|
14086
14197
|
__decorate$4([
|
|
14087
14198
|
Property(new Date(2099, 11, 31))
|
|
14088
14199
|
], DateTimePicker.prototype, "max", void 0);
|
|
14200
|
+
__decorate$4([
|
|
14201
|
+
Property(null)
|
|
14202
|
+
], DateTimePicker.prototype, "minTime", void 0);
|
|
14203
|
+
__decorate$4([
|
|
14204
|
+
Property(null)
|
|
14205
|
+
], DateTimePicker.prototype, "maxTime", void 0);
|
|
14089
14206
|
__decorate$4([
|
|
14090
14207
|
Property(null)
|
|
14091
14208
|
], DateTimePicker.prototype, "firstDayOfWeek", void 0);
|