@syncfusion/ej2-calendars 19.2.62 → 19.3.53
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/.eslintrc.json +1 -1
- package/CHANGELOG.md +8 -0
- 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 +612 -1062
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +609 -1059
- 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 +10 -10
- package/src/calendar/calendar-model.d.ts +1 -10
- package/src/calendar/calendar.d.ts +0 -12
- package/src/calendar/calendar.js +146 -201
- package/src/datepicker/datepicker-model.d.ts +1 -11
- package/src/datepicker/datepicker.d.ts +0 -11
- package/src/datepicker/datepicker.js +168 -310
- package/src/daterangepicker/daterangepicker-model.d.ts +1 -23
- package/src/daterangepicker/daterangepicker.d.ts +0 -22
- package/src/daterangepicker/daterangepicker.js +19 -19
- package/src/datetimepicker/datetimepicker-model.d.ts +1 -14
- package/src/datetimepicker/datetimepicker.d.ts +0 -13
- package/src/datetimepicker/datetimepicker.js +10 -13
- package/src/maskbase/masked-date-time.d.ts +6 -0
- package/src/maskbase/masked-date-time.js +35 -1
- package/src/timepicker/timepicker-model.d.ts +1 -15
- package/src/timepicker/timepicker.d.ts +0 -19
- package/src/timepicker/timepicker.js +238 -519
- package/styles/bootstrap-dark.css +17 -2
- package/styles/bootstrap.css +17 -2
- package/styles/bootstrap4.css +17 -2
- package/styles/bootstrap5-dark.css +2676 -0
- package/styles/bootstrap5-dark.scss +5 -0
- package/styles/bootstrap5.css +2676 -0
- package/styles/bootstrap5.scss +5 -0
- package/styles/calendar/_bootstrap-dark-definition.scss +4 -2
- package/styles/calendar/_bootstrap-definition.scss +4 -2
- package/styles/calendar/_bootstrap4-definition.scss +4 -2
- package/styles/calendar/_bootstrap5-dark-definition.scss +1 -0
- package/styles/calendar/_bootstrap5-definition.scss +213 -0
- package/styles/calendar/_fabric-dark-definition.scss +3 -0
- package/styles/calendar/_fabric-definition.scss +3 -0
- package/styles/calendar/_highcontrast-definition.scss +3 -0
- package/styles/calendar/_highcontrast-light-definition.scss +3 -0
- package/styles/calendar/_layout.scss +8 -0
- package/styles/calendar/_material-dark-definition.scss +3 -0
- package/styles/calendar/_material-definition.scss +3 -0
- package/styles/calendar/_tailwind-dark-definition.scss +1 -220
- package/styles/calendar/_tailwind-definition.scss +84 -101
- package/styles/calendar/_theme.scss +40 -0
- package/styles/calendar/bootstrap-dark.css +17 -2
- package/styles/calendar/bootstrap.css +17 -2
- package/styles/calendar/bootstrap4.css +17 -2
- package/styles/calendar/bootstrap5-dark.css +1038 -0
- package/styles/calendar/bootstrap5-dark.scss +5 -0
- package/styles/calendar/bootstrap5.css +1038 -0
- package/styles/calendar/bootstrap5.scss +5 -0
- package/styles/calendar/fabric-dark.css +15 -0
- package/styles/calendar/fabric.css +15 -0
- package/styles/calendar/highcontrast-light.css +15 -0
- package/styles/calendar/highcontrast.css +15 -0
- package/styles/calendar/icons/_bootstrap5-dark.scss +1 -0
- package/styles/calendar/icons/_bootstrap5.scss +12 -0
- package/styles/calendar/icons/_tailwind-dark.scss +1 -13
- package/styles/calendar/material-dark.css +28 -13
- package/styles/calendar/material.css +15 -0
- package/styles/calendar/tailwind-dark.css +17 -2
- package/styles/calendar/tailwind.css +17 -2
- package/styles/datepicker/_bootstrap5-dark-definition.scss +1 -0
- package/styles/datepicker/_bootstrap5-definition.scss +36 -0
- package/styles/datepicker/_layout.scss +1 -2
- package/styles/datepicker/_tailwind-dark-definition.scss +1 -34
- package/styles/datepicker/_tailwind-definition.scss +13 -13
- package/styles/datepicker/_theme.scss +2 -2
- package/styles/datepicker/bootstrap5-dark.css +177 -0
- package/styles/datepicker/bootstrap5-dark.scss +7 -0
- package/styles/datepicker/bootstrap5.css +177 -0
- package/styles/datepicker/bootstrap5.scss +7 -0
- package/styles/datepicker/icons/_bootstrap5-dark.scss +1 -0
- package/styles/datepicker/icons/_bootstrap5.scss +55 -0
- package/styles/datepicker/icons/_tailwind-dark.scss +1 -55
- package/styles/datepicker/material-dark.css +3 -3
- package/styles/daterangepicker/_bootstrap5-dark-definition.scss +1 -0
- package/styles/daterangepicker/_bootstrap5-definition.scss +222 -0
- package/styles/daterangepicker/_layout.scss +2 -2
- package/styles/daterangepicker/_tailwind-dark-definition.scss +1 -192
- package/styles/daterangepicker/_tailwind-definition.scss +81 -79
- package/styles/daterangepicker/_theme.scss +82 -0
- package/styles/daterangepicker/bootstrap5-dark.css +1029 -0
- package/styles/daterangepicker/bootstrap5-dark.scss +7 -0
- package/styles/daterangepicker/bootstrap5.css +1029 -0
- package/styles/daterangepicker/bootstrap5.scss +7 -0
- package/styles/daterangepicker/icons/_bootstrap5-dark.scss +1 -0
- package/styles/daterangepicker/icons/_bootstrap5.scss +67 -0
- package/styles/daterangepicker/icons/_tailwind-dark.scss +1 -63
- package/styles/daterangepicker/material-dark.css +9 -9
- package/styles/datetimepicker/_bootstrap5-dark-definition.scss +1 -0
- package/styles/datetimepicker/_bootstrap5-definition.scss +55 -0
- package/styles/datetimepicker/_tailwind-dark-definition.scss +1 -53
- package/styles/datetimepicker/_tailwind-definition.scss +16 -14
- package/styles/datetimepicker/bootstrap5-dark.css +205 -0
- package/styles/datetimepicker/bootstrap5-dark.scss +8 -0
- package/styles/datetimepicker/bootstrap5.css +205 -0
- package/styles/datetimepicker/bootstrap5.scss +8 -0
- package/styles/datetimepicker/icons/_bootstrap5-dark.scss +1 -0
- package/styles/datetimepicker/icons/_bootstrap5.scss +11 -0
- package/styles/datetimepicker/icons/_tailwind-dark.scss +1 -10
- package/styles/datetimepicker/material-dark.css +4 -4
- package/styles/fabric-dark.css +15 -0
- package/styles/fabric.css +15 -0
- package/styles/highcontrast-light.css +15 -0
- package/styles/highcontrast.css +15 -0
- package/styles/material-dark.css +48 -33
- package/styles/material.css +15 -0
- package/styles/tailwind-dark.css +17 -2
- package/styles/tailwind.css +17 -2
- package/styles/timepicker/_bootstrap5-dark-definition.scss +1 -0
- package/styles/timepicker/_bootstrap5-definition.scss +52 -0
- package/styles/timepicker/_tailwind-dark-definition.scss +1 -48
- package/styles/timepicker/_tailwind-definition.scss +19 -17
- package/styles/timepicker/_theme.scss +1 -1
- package/styles/timepicker/bootstrap5-dark.css +223 -0
- package/styles/timepicker/bootstrap5-dark.scss +6 -0
- package/styles/timepicker/bootstrap5.css +223 -0
- package/styles/timepicker/bootstrap5.scss +6 -0
- package/styles/timepicker/icons/_bootstrap5-dark.scss +1 -0
- package/styles/timepicker/icons/_bootstrap5.scss +13 -0
- package/styles/timepicker/icons/_tailwind-dark.scss +1 -12
- package/styles/timepicker/material-dark.css +4 -4
package/src/calendar/calendar.js
CHANGED
|
@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
17
17
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
18
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
19
|
};
|
|
20
|
-
import { Component, EventHandler, Internationalization
|
|
20
|
+
import { Component, EventHandler, Internationalization } from '@syncfusion/ej2-base';
|
|
21
21
|
import { KeyboardEvents, L10n } from '@syncfusion/ej2-base';
|
|
22
22
|
import { NotifyPropertyChanges } from '@syncfusion/ej2-base';
|
|
23
23
|
import { cldrData, getDefaultDateObject, rippleEffect } from '@syncfusion/ej2-base';
|
|
@@ -303,7 +303,7 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
303
303
|
CalendarBase.prototype.getCultureValues = function () {
|
|
304
304
|
var culShortNames = [];
|
|
305
305
|
var cldrObj;
|
|
306
|
-
var dayFormat =
|
|
306
|
+
var dayFormat = 'days.stand-alone.' + this.dayHeaderFormat.toLowerCase();
|
|
307
307
|
if (this.locale === 'en' || this.locale === 'en-US') {
|
|
308
308
|
cldrObj = (getValue(dayFormat, getDefaultDateObject()));
|
|
309
309
|
}
|
|
@@ -412,17 +412,8 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
412
412
|
}
|
|
413
413
|
};
|
|
414
414
|
CalendarBase.prototype.wireEvents = function (id, ref, keyConfig, moduleName) {
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
this.defaultKeyConfigs = extend(this.defaultKeyConfigs, this.keyConfigs);
|
|
418
|
-
}
|
|
419
|
-
else {
|
|
420
|
-
this.element = document.getElementById(id);
|
|
421
|
-
this.defaultKeyConfigs = this.getDefaultKeyConfig();
|
|
422
|
-
this.defaultKeyConfigs = extend(this.defaultKeyConfigs, keyConfig);
|
|
423
|
-
this.blazorRef = ref;
|
|
424
|
-
this.serverModuleName = moduleName;
|
|
425
|
-
}
|
|
415
|
+
EventHandler.add(this.headerTitleElement, 'click', this.navigateTitle, this);
|
|
416
|
+
this.defaultKeyConfigs = extend(this.defaultKeyConfigs, this.keyConfigs);
|
|
426
417
|
if (this.getModuleName() === 'calendar') {
|
|
427
418
|
this.keyboardModule = new KeyboardEvents(this.element, {
|
|
428
419
|
eventName: 'keydown',
|
|
@@ -441,7 +432,6 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
441
432
|
CalendarBase.prototype.dateWireEvents = function (id, ref, keyConfig, moduleName) {
|
|
442
433
|
this.defaultKeyConfigs = this.getDefaultKeyConfig();
|
|
443
434
|
this.defaultKeyConfigs = extend(this.defaultKeyConfigs, keyConfig);
|
|
444
|
-
this.blazorRef = ref;
|
|
445
435
|
this.serverModuleName = moduleName;
|
|
446
436
|
};
|
|
447
437
|
CalendarBase.prototype.todayButtonClick = function (e, value, isCustomDate) {
|
|
@@ -472,21 +462,7 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
472
462
|
this.renderDayCellArgs = null;
|
|
473
463
|
this.calendarElement = this.tableBodyElement = this.footer = this.tableHeadElement = this.nextIcon = this.previousIcon = this.table = null;
|
|
474
464
|
};
|
|
475
|
-
CalendarBase.prototype.checkDeviceMode = function (ref) {
|
|
476
|
-
if (Browser.isDevice && isBlazor() && ref) {
|
|
477
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
478
|
-
ref.invokeMethodAsync('OnDevice', true);
|
|
479
|
-
}
|
|
480
|
-
};
|
|
481
465
|
CalendarBase.prototype.keyActionHandle = function (e, value, multiSelection) {
|
|
482
|
-
if (isBlazor() && this.blazorRef) {
|
|
483
|
-
e.preventDefault();
|
|
484
|
-
if (!this.tableBodyElement) {
|
|
485
|
-
this.element = closest(e.target, '.' + 'e-calendar');
|
|
486
|
-
this.tableBodyElement = this.element.querySelector('tbody');
|
|
487
|
-
}
|
|
488
|
-
multiSelection = false;
|
|
489
|
-
}
|
|
490
466
|
var focusedDate = this.tableBodyElement.querySelector('tr td.e-focused-date');
|
|
491
467
|
var selectedDate;
|
|
492
468
|
if (multiSelection) {
|
|
@@ -500,147 +476,124 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
500
476
|
else {
|
|
501
477
|
selectedDate = this.tableBodyElement.querySelector('tr td.e-selected');
|
|
502
478
|
}
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
if (view === 0) {
|
|
549
|
-
this.keyboardNavigate(7, view, e, this.max, this.min);
|
|
550
|
-
}
|
|
551
|
-
else {
|
|
552
|
-
this.keyboardNavigate(4, view, e, this.max, this.min);
|
|
553
|
-
}
|
|
554
|
-
e.preventDefault();
|
|
555
|
-
break;
|
|
556
|
-
case 'select':
|
|
557
|
-
if (e.target === this.todayElement) {
|
|
558
|
-
this.todayButtonClick(e, value);
|
|
559
|
-
}
|
|
560
|
-
else {
|
|
561
|
-
var element = !isNullOrUndefined(focusedDate) ? focusedDate : selectedDate;
|
|
562
|
-
if (!isNullOrUndefined(element) && !element.classList.contains(DISABLED)) {
|
|
563
|
-
if (levelRestrict) {
|
|
564
|
-
// eslint-disable-next-line radix
|
|
565
|
-
var d = new Date(parseInt('' + (element).id, 0));
|
|
566
|
-
this.selectDate(e, d, (element));
|
|
567
|
-
}
|
|
568
|
-
else {
|
|
569
|
-
this.contentClick(null, --view, (element), value);
|
|
570
|
-
}
|
|
479
|
+
var view = this.getViewNumber(this.currentView());
|
|
480
|
+
var depthValue = this.getViewNumber(this.depth);
|
|
481
|
+
var levelRestrict = (view === depthValue && this.getViewNumber(this.start) >= depthValue);
|
|
482
|
+
this.effect = '';
|
|
483
|
+
switch (e.action) {
|
|
484
|
+
case 'moveLeft':
|
|
485
|
+
this.keyboardNavigate(-1, view, e, this.max, this.min);
|
|
486
|
+
e.preventDefault();
|
|
487
|
+
break;
|
|
488
|
+
case 'moveRight':
|
|
489
|
+
this.keyboardNavigate(1, view, e, this.max, this.min);
|
|
490
|
+
e.preventDefault();
|
|
491
|
+
break;
|
|
492
|
+
case 'moveUp':
|
|
493
|
+
if (view === 0) {
|
|
494
|
+
this.keyboardNavigate(-7, view, e, this.max, this.min); // move the current date to the previous seven days.
|
|
495
|
+
}
|
|
496
|
+
else {
|
|
497
|
+
this.keyboardNavigate(-4, view, e, this.max, this.min); // move the current year to the previous four days.
|
|
498
|
+
}
|
|
499
|
+
e.preventDefault();
|
|
500
|
+
break;
|
|
501
|
+
case 'moveDown':
|
|
502
|
+
if (view === 0) {
|
|
503
|
+
this.keyboardNavigate(7, view, e, this.max, this.min);
|
|
504
|
+
}
|
|
505
|
+
else {
|
|
506
|
+
this.keyboardNavigate(4, view, e, this.max, this.min);
|
|
507
|
+
}
|
|
508
|
+
e.preventDefault();
|
|
509
|
+
break;
|
|
510
|
+
case 'select':
|
|
511
|
+
if (e.target === this.todayElement) {
|
|
512
|
+
this.todayButtonClick(e, value);
|
|
513
|
+
}
|
|
514
|
+
else {
|
|
515
|
+
var element = !isNullOrUndefined(focusedDate) ? focusedDate : selectedDate;
|
|
516
|
+
if (!isNullOrUndefined(element) && !element.classList.contains(DISABLED)) {
|
|
517
|
+
if (levelRestrict) {
|
|
518
|
+
// eslint-disable-next-line radix
|
|
519
|
+
var d = new Date(parseInt('' + (element).id, 0));
|
|
520
|
+
this.selectDate(e, d, (element));
|
|
521
|
+
}
|
|
522
|
+
else {
|
|
523
|
+
this.contentClick(null, --view, (element), value);
|
|
571
524
|
}
|
|
572
525
|
}
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
526
|
+
}
|
|
527
|
+
break;
|
|
528
|
+
case 'controlUp':
|
|
529
|
+
this.title();
|
|
530
|
+
e.preventDefault();
|
|
531
|
+
break;
|
|
532
|
+
case 'controlDown':
|
|
533
|
+
if (!isNullOrUndefined(focusedDate) || !isNullOrUndefined(selectedDate) && !levelRestrict) {
|
|
534
|
+
this.contentClick(null, --view, (focusedDate || selectedDate), value);
|
|
535
|
+
}
|
|
536
|
+
e.preventDefault();
|
|
537
|
+
break;
|
|
538
|
+
case 'home':
|
|
539
|
+
this.currentDate = this.firstDay(this.currentDate);
|
|
540
|
+
detach(this.tableBodyElement);
|
|
541
|
+
if (view === 0) {
|
|
542
|
+
this.renderMonths(e);
|
|
543
|
+
}
|
|
544
|
+
else if (view === 1) {
|
|
545
|
+
this.renderYears(e);
|
|
546
|
+
}
|
|
547
|
+
else {
|
|
548
|
+
this.renderDecades(e);
|
|
549
|
+
}
|
|
550
|
+
e.preventDefault();
|
|
551
|
+
break;
|
|
552
|
+
case 'end':
|
|
553
|
+
this.currentDate = this.lastDay(this.currentDate, view);
|
|
554
|
+
detach(this.tableBodyElement);
|
|
555
|
+
if (view === 0) {
|
|
556
|
+
this.renderMonths(e);
|
|
557
|
+
}
|
|
558
|
+
else if (view === 1) {
|
|
559
|
+
this.renderYears(e);
|
|
560
|
+
}
|
|
561
|
+
else {
|
|
562
|
+
this.renderDecades(e);
|
|
563
|
+
}
|
|
564
|
+
e.preventDefault();
|
|
565
|
+
break;
|
|
566
|
+
case 'pageUp':
|
|
567
|
+
this.addMonths(this.currentDate, -1);
|
|
568
|
+
this.navigateTo('Month', this.currentDate);
|
|
569
|
+
e.preventDefault();
|
|
570
|
+
break;
|
|
571
|
+
case 'pageDown':
|
|
572
|
+
this.addMonths(this.currentDate, 1);
|
|
573
|
+
this.navigateTo('Month', this.currentDate);
|
|
574
|
+
e.preventDefault();
|
|
575
|
+
break;
|
|
576
|
+
case 'shiftPageUp':
|
|
577
|
+
this.addYears(this.currentDate, -1);
|
|
578
|
+
this.navigateTo('Month', this.currentDate);
|
|
579
|
+
e.preventDefault();
|
|
580
|
+
break;
|
|
581
|
+
case 'shiftPageDown':
|
|
582
|
+
this.addYears(this.currentDate, 1);
|
|
583
|
+
this.navigateTo('Month', this.currentDate);
|
|
584
|
+
e.preventDefault();
|
|
585
|
+
break;
|
|
586
|
+
case 'controlHome':
|
|
587
|
+
this.navigateTo('Month', new Date(this.currentDate.getFullYear(), 0, 1));
|
|
588
|
+
e.preventDefault();
|
|
589
|
+
break;
|
|
590
|
+
case 'controlEnd':
|
|
591
|
+
this.navigateTo('Month', new Date(this.currentDate.getFullYear(), 11, 31));
|
|
592
|
+
e.preventDefault();
|
|
593
|
+
break;
|
|
594
|
+
}
|
|
595
|
+
if (this.getModuleName() === 'calendar') {
|
|
596
|
+
this.table.focus();
|
|
644
597
|
}
|
|
645
598
|
};
|
|
646
599
|
CalendarBase.prototype.keyboardNavigate = function (number, currentView, e, max, min) {
|
|
@@ -764,12 +717,12 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
764
717
|
}
|
|
765
718
|
minMaxDate = new Date(+localDate);
|
|
766
719
|
localDate = this.minMaxDate(localDate);
|
|
767
|
-
var dateFormatOptions = { type: 'dateTime', skeleton:
|
|
720
|
+
var dateFormatOptions = { type: 'dateTime', skeleton: 'full' };
|
|
768
721
|
var date = this.globalize.parseDate(this.globalize.formatDate(localDate, dateFormatOptions), dateFormatOptions);
|
|
769
722
|
var tdEle = this.dayCell(localDate);
|
|
770
|
-
var title = this.globalize.formatDate(localDate, { type: 'date', skeleton:
|
|
723
|
+
var title = this.globalize.formatDate(localDate, { type: 'date', skeleton: 'full' });
|
|
771
724
|
var dayLink = this.createElement('span');
|
|
772
|
-
dayLink.textContent = this.globalize.formatDate(localDate, { format: 'd', type: 'date', skeleton:
|
|
725
|
+
dayLink.textContent = this.globalize.formatDate(localDate, { format: 'd', type: 'date', skeleton: 'yMd' });
|
|
773
726
|
var disabled = (this.min > localDate) || (this.max < localDate);
|
|
774
727
|
if (disabled) {
|
|
775
728
|
addClass([tdEle], DISABLED);
|
|
@@ -799,8 +752,8 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
799
752
|
if (multiSelection) {
|
|
800
753
|
if (!isNullOrUndefined(values) && values.length > 0) {
|
|
801
754
|
for (var index = 0; index < values.length; index++) {
|
|
802
|
-
var localDateString = +new Date(this.globalize.formatDate(argument.date, { type: 'date', skeleton:
|
|
803
|
-
var tempDateString = +new Date(this.globalize.formatDate(values[index], { type: 'date', skeleton:
|
|
755
|
+
var localDateString = +new Date(this.globalize.formatDate(argument.date, { type: 'date', skeleton: 'yMd' }));
|
|
756
|
+
var tempDateString = +new Date(this.globalize.formatDate(values[index], { type: 'date', skeleton: 'yMd' }));
|
|
804
757
|
if (localDateString === tempDateString) {
|
|
805
758
|
values.splice(index, 1);
|
|
806
759
|
index = -1;
|
|
@@ -831,7 +784,7 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
831
784
|
if (multiSelection && !isNullOrUndefined(values) && !disabledCls) {
|
|
832
785
|
for (var tempValue = 0; tempValue < values.length; tempValue++) {
|
|
833
786
|
var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
|
|
834
|
-
var formatOptions = { format:
|
|
787
|
+
var formatOptions = { format: null, type: 'date', skeleton: 'short', calendar: type };
|
|
835
788
|
var localDateString = this.globalize.formatDate(localDate, formatOptions);
|
|
836
789
|
var tempDateString = this.globalize.formatDate(values[tempValue], formatOptions);
|
|
837
790
|
if ((localDateString === tempDateString && this.getDateVal(localDate, values[tempValue]))
|
|
@@ -898,7 +851,7 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
898
851
|
var localMonth = (value && (value).getMonth() === localDate.getMonth());
|
|
899
852
|
var select = (value && (value).getFullYear() === yr && localMonth);
|
|
900
853
|
dayLink.textContent = this.toCapitalize(this.globalize.formatDate(localDate, {
|
|
901
|
-
format:
|
|
854
|
+
format: null, type: 'dateTime', skeleton: 'MMM'
|
|
902
855
|
}));
|
|
903
856
|
if ((this.min && (curYrs < minYr || (month < minMonth && curYrs === minYr))) || (this.max && (curYrs > maxYr || (month > maxMonth && curYrs >= maxYr)))) {
|
|
904
857
|
addClass([tdEle], DISABLED);
|
|
@@ -935,9 +888,9 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
935
888
|
var startFullYr = startYr.getFullYear();
|
|
936
889
|
var endFullYr = endYr.getFullYear();
|
|
937
890
|
var startHdrYr = this.globalize.formatDate(startYr, {
|
|
938
|
-
format:
|
|
891
|
+
format: null, type: 'dateTime', skeleton: 'y'
|
|
939
892
|
});
|
|
940
|
-
var endHdrYr = this.globalize.formatDate(endYr, { format:
|
|
893
|
+
var endHdrYr = this.globalize.formatDate(endYr, { format: null, type: 'dateTime', skeleton: 'y' });
|
|
941
894
|
this.headerTitleElement.textContent = startHdrYr + ' - ' + (endHdrYr);
|
|
942
895
|
var start = new Date(localYr - (localYr % 10) - 1, 0, 1);
|
|
943
896
|
var startYear = start.getFullYear();
|
|
@@ -948,7 +901,7 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
948
901
|
attributes(tdEle, { 'role': 'gridcell' });
|
|
949
902
|
var dayLink = this.createElement('span');
|
|
950
903
|
dayLink.textContent = this.globalize.formatDate(localDate, {
|
|
951
|
-
format:
|
|
904
|
+
format: null, type: 'dateTime', skeleton: 'y'
|
|
952
905
|
});
|
|
953
906
|
if ((year < startFullYr) || (year > endFullYr)) {
|
|
954
907
|
addClass([tdEle], OTHERDECADE);
|
|
@@ -982,7 +935,7 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
982
935
|
};
|
|
983
936
|
CalendarBase.prototype.dayCell = function (localDate) {
|
|
984
937
|
var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
|
|
985
|
-
var dateFormatOptions = { skeleton:
|
|
938
|
+
var dateFormatOptions = { skeleton: 'full', type: 'dateTime', calendar: type };
|
|
986
939
|
var date = this.globalize.parseDate(this.globalize.formatDate(localDate, dateFormatOptions), dateFormatOptions);
|
|
987
940
|
var value = date.valueOf();
|
|
988
941
|
var attrs = {
|
|
@@ -1367,15 +1320,15 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
1367
1320
|
var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
|
|
1368
1321
|
var tempValueString = void 0;
|
|
1369
1322
|
if (this.calendarMode === 'Gregorian') {
|
|
1370
|
-
tempValueString = this.globalize.formatDate(tempValue, { type: 'date', skeleton:
|
|
1323
|
+
tempValueString = this.globalize.formatDate(tempValue, { type: 'date', skeleton: 'yMd' });
|
|
1371
1324
|
}
|
|
1372
1325
|
else {
|
|
1373
1326
|
tempValueString = this.globalize.formatDate(tempValue, { type: 'dateTime', skeleton: 'full', calendar: 'islamic' });
|
|
1374
1327
|
}
|
|
1375
|
-
var minFormatOption = { type: 'date', skeleton:
|
|
1328
|
+
var minFormatOption = { type: 'date', skeleton: 'yMd', calendar: type };
|
|
1376
1329
|
var minStringValue = this.globalize.formatDate(this.min, minFormatOption);
|
|
1377
1330
|
var minString = minStringValue;
|
|
1378
|
-
var maxFormatOption = { type: 'date', skeleton:
|
|
1331
|
+
var maxFormatOption = { type: 'date', skeleton: 'yMd', calendar: type };
|
|
1379
1332
|
var maxStringValue = this.globalize.formatDate(this.max, maxFormatOption);
|
|
1380
1333
|
var maxString = maxStringValue;
|
|
1381
1334
|
if (+new Date(tempValueString) < +new Date(minString) ||
|
|
@@ -1409,9 +1362,9 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
1409
1362
|
var monthFormatOptions;
|
|
1410
1363
|
var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
|
|
1411
1364
|
if (this.calendarMode === 'Gregorian') {
|
|
1412
|
-
dayFormatOptions = globalize.formatDate(date, { type: 'dateTime', skeleton:
|
|
1365
|
+
dayFormatOptions = globalize.formatDate(date, { type: 'dateTime', skeleton: 'yMMMM', calendar: type });
|
|
1413
1366
|
monthFormatOptions = globalize.formatDate(date, {
|
|
1414
|
-
format:
|
|
1367
|
+
format: null, type: 'dateTime', skeleton: 'y', calendar: type
|
|
1415
1368
|
});
|
|
1416
1369
|
}
|
|
1417
1370
|
else {
|
|
@@ -1434,11 +1387,11 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
1434
1387
|
var title;
|
|
1435
1388
|
var view = this.currentView();
|
|
1436
1389
|
if (view === 'Month') {
|
|
1437
|
-
title = this.globalize.formatDate(this.currentDate, { type: 'date', skeleton:
|
|
1390
|
+
title = this.globalize.formatDate(this.currentDate, { type: 'date', skeleton: 'full', calendar: type });
|
|
1438
1391
|
}
|
|
1439
1392
|
else if (view === 'Year') {
|
|
1440
1393
|
if (type !== 'islamic') {
|
|
1441
|
-
title = this.globalize.formatDate(this.currentDate, { type: 'date', skeleton:
|
|
1394
|
+
title = this.globalize.formatDate(this.currentDate, { type: 'date', skeleton: 'yMMMM', calendar: type });
|
|
1442
1395
|
}
|
|
1443
1396
|
else {
|
|
1444
1397
|
title = this.globalize.formatDate(this.currentDate, { type: 'date', skeleton: 'GyMMM', calendar: type });
|
|
@@ -1446,7 +1399,7 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
1446
1399
|
}
|
|
1447
1400
|
else {
|
|
1448
1401
|
title = this.globalize.formatDate(this.currentDate, {
|
|
1449
|
-
format:
|
|
1402
|
+
format: null, type: 'date', skeleton: 'y', calendar: type
|
|
1450
1403
|
});
|
|
1451
1404
|
}
|
|
1452
1405
|
if (selectedEle || focusedEle) {
|
|
@@ -1644,11 +1597,9 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
1644
1597
|
};
|
|
1645
1598
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1646
1599
|
CalendarBase.prototype.getCultureObjects = function (ld, c) {
|
|
1647
|
-
var gregorianFormat =
|
|
1648
|
-
|
|
1649
|
-
var
|
|
1650
|
-
'.dates.calendars.islamic.days.format.') + this.dayHeaderFormat.toLowerCase();
|
|
1651
|
-
var mainVal = isBlazor() ? '' : 'main.';
|
|
1600
|
+
var gregorianFormat = '.dates.calendars.gregorian.days.format.' + this.dayHeaderFormat.toLowerCase();
|
|
1601
|
+
var islamicFormat = '.dates.calendars.islamic.days.format.' + this.dayHeaderFormat.toLowerCase();
|
|
1602
|
+
var mainVal = 'main.';
|
|
1652
1603
|
if (this.calendarMode === 'Gregorian') {
|
|
1653
1604
|
return getValue(mainVal + '' + this.locale + gregorianFormat, ld);
|
|
1654
1605
|
}
|
|
@@ -1700,7 +1651,7 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
1700
1651
|
eve = element;
|
|
1701
1652
|
}
|
|
1702
1653
|
var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
|
|
1703
|
-
var dateFormatOptions = { type: 'dateTime', skeleton:
|
|
1654
|
+
var dateFormatOptions = { type: 'dateTime', skeleton: 'full', calendar: type };
|
|
1704
1655
|
// eslint-disable-next-line radix
|
|
1705
1656
|
var dateString = this.globalize.formatDate(new Date(parseInt('' + eve.getAttribute('id'), 0)), dateFormatOptions);
|
|
1706
1657
|
var date = this.globalize.parseDate(dateString, dateFormatOptions);
|
|
@@ -1768,7 +1719,7 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
1768
1719
|
removeClass([element], SELECTED);
|
|
1769
1720
|
for (var i = 0; i < copyValues.length; i++) {
|
|
1770
1721
|
var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
|
|
1771
|
-
var formatOptions = { format:
|
|
1722
|
+
var formatOptions = { format: null, type: 'date', skeleton: 'short', calendar: type };
|
|
1772
1723
|
var localDateString = this.globalize.formatDate(date, formatOptions);
|
|
1773
1724
|
var tempDateString = this.globalize.formatDate(copyValues[i], formatOptions);
|
|
1774
1725
|
if (localDateString === tempDateString) {
|
|
@@ -1788,22 +1739,16 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
1788
1739
|
}
|
|
1789
1740
|
this.isDateSelected = true;
|
|
1790
1741
|
};
|
|
1791
|
-
CalendarBase.prototype.getFromatStringValue = function () {
|
|
1792
|
-
return isBlazor() ?
|
|
1793
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1794
|
-
'M' + getDefaultDateObject().dateSeperator + 'd' + getDefaultDateObject().dateSeperator + 'yy'
|
|
1795
|
-
: null;
|
|
1796
|
-
};
|
|
1797
1742
|
CalendarBase.prototype.checkPresentDate = function (dates, values) {
|
|
1798
1743
|
var previousValue = false;
|
|
1799
1744
|
if (!isNullOrUndefined(values)) {
|
|
1800
1745
|
for (var checkPrevious = 0; checkPrevious < values.length; checkPrevious++) {
|
|
1801
1746
|
var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
|
|
1802
1747
|
var localDateString = this.globalize.formatDate(dates, {
|
|
1803
|
-
format:
|
|
1748
|
+
format: null, type: 'date', skeleton: 'short', calendar: type
|
|
1804
1749
|
});
|
|
1805
1750
|
var tempDateString = this.globalize.formatDate(values[checkPrevious], {
|
|
1806
|
-
format:
|
|
1751
|
+
format: null, type: 'date', skeleton: 'short', calendar: type
|
|
1807
1752
|
});
|
|
1808
1753
|
if (localDateString === tempDateString) {
|
|
1809
1754
|
previousValue = true;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventHandler, Property, Internationalization, NotifyPropertyChanges, DateFormatOptions
|
|
1
|
+
import { EventHandler, Property, Internationalization, NotifyPropertyChanges, DateFormatOptions } from '@syncfusion/ej2-base';import { KeyboardEvents, KeyboardEventArgs, Animation, EmitType, Event, extend, L10n, Browser, formatUnit } from '@syncfusion/ej2-base';import { detach, addClass, removeClass, closest, attributes, select } from '@syncfusion/ej2-base';import { isNullOrUndefined, setValue, getUniqueID, ModuleDeclaration } from '@syncfusion/ej2-base';import { Popup } from '@syncfusion/ej2-popups';import { Input, InputObject, IInput, FloatLabelType } from '@syncfusion/ej2-inputs';import { ChangedEventArgs, CalendarView, Calendar, BlurEventArgs, FocusEventArgs, ClearedEventArgs, DayHeaderFormats} from '../calendar/calendar';import { MaskPlaceholderModel } from '../calendar/calendar-model'
|
|
2
2
|
import {FormatObject,PopupObjectArgs,PreventableEventArgs} from "./datepicker";
|
|
3
3
|
import {CalendarModel} from "../calendar/calendar-model";
|
|
4
4
|
|
|
@@ -50,7 +50,6 @@ export interface DatePickerModel extends CalendarModel{
|
|
|
50
50
|
*
|
|
51
51
|
* @default null
|
|
52
52
|
* @aspType string
|
|
53
|
-
* @blazorType string
|
|
54
53
|
*/
|
|
55
54
|
format?: string | FormatObject;
|
|
56
55
|
|
|
@@ -216,7 +215,6 @@ export interface DatePickerModel extends CalendarModel{
|
|
|
216
215
|
* {% codeBlock src='datepicker/keyConfigs/index.md' %}{% endcodeBlock %}
|
|
217
216
|
*
|
|
218
217
|
* @default null
|
|
219
|
-
* @blazorType object
|
|
220
218
|
|
|
221
219
|
*/
|
|
222
220
|
keyConfigs?: { [key: string]: string };
|
|
@@ -235,7 +233,6 @@ export interface DatePickerModel extends CalendarModel{
|
|
|
235
233
|
*
|
|
236
234
|
* @default 1000
|
|
237
235
|
* @aspType int
|
|
238
|
-
* @blazorType int
|
|
239
236
|
*/
|
|
240
237
|
zIndex?: number;
|
|
241
238
|
|
|
@@ -262,7 +259,6 @@ export interface DatePickerModel extends CalendarModel{
|
|
|
262
259
|
*
|
|
263
260
|
* @default Syncfusion.EJ2.Inputs.FloatLabelType.Never
|
|
264
261
|
* @aspType Syncfusion.EJ2.Inputs.FloatLabelType
|
|
265
|
-
* @blazorType Syncfusion.Blazor.Inputs.FloatLabelType
|
|
266
262
|
* @isEnumeration true
|
|
267
263
|
*/
|
|
268
264
|
floatLabelType?: FloatLabelType | string;
|
|
@@ -305,8 +301,6 @@ export interface DatePickerModel extends CalendarModel{
|
|
|
305
301
|
* Triggers when the popup is opened.
|
|
306
302
|
*
|
|
307
303
|
* @event open
|
|
308
|
-
* @blazorProperty 'OnOpen'
|
|
309
|
-
* @blazorType PopupObjectArgs
|
|
310
304
|
*/
|
|
311
305
|
open?: EmitType<PreventableEventArgs | PopupObjectArgs>;
|
|
312
306
|
|
|
@@ -321,8 +315,6 @@ export interface DatePickerModel extends CalendarModel{
|
|
|
321
315
|
* Triggers when the popup is closed.
|
|
322
316
|
*
|
|
323
317
|
* @event close
|
|
324
|
-
* @blazorProperty 'OnClose'
|
|
325
|
-
* @blazorType PopupObjectArgs
|
|
326
318
|
*/
|
|
327
319
|
close?: EmitType<PreventableEventArgs | PopupObjectArgs>;
|
|
328
320
|
|
|
@@ -344,7 +336,6 @@ export interface DatePickerModel extends CalendarModel{
|
|
|
344
336
|
* Triggers when the component is created.
|
|
345
337
|
*
|
|
346
338
|
* @event created
|
|
347
|
-
* @blazorProperty 'Created'
|
|
348
339
|
*/
|
|
349
340
|
created?: EmitType<Object>;
|
|
350
341
|
|
|
@@ -352,7 +343,6 @@ export interface DatePickerModel extends CalendarModel{
|
|
|
352
343
|
* Triggers when the component is destroyed.
|
|
353
344
|
*
|
|
354
345
|
* @event destroyed
|
|
355
|
-
* @blazorProperty 'Destroyed'
|
|
356
346
|
*/
|
|
357
347
|
destroyed?: EmitType<Object>;
|
|
358
348
|
|