@syncfusion/ej2-calendars 24.2.5 → 24.2.8
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/CHANGELOG.md +10 -0
- 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 +15 -21
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +15 -21
- 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.js +5 -5
- package/src/daterangepicker/daterangepicker.d.ts +0 -2
- package/src/daterangepicker/daterangepicker.js +8 -12
- package/src/maskbase/masked-date-time.js +2 -4
|
@@ -19,7 +19,7 @@ const DEVICE = 'e-device';
|
|
|
19
19
|
const HEADER = 'e-header';
|
|
20
20
|
const RTL = 'e-rtl';
|
|
21
21
|
const CONTENT = 'e-content';
|
|
22
|
-
const CONTENTTABLE = 'e-content-table';
|
|
22
|
+
const CONTENTTABLE = 'e-calandar-content-table';
|
|
23
23
|
const YEAR = 'e-year';
|
|
24
24
|
const MONTH = 'e-month';
|
|
25
25
|
const DECADE = 'e-decade';
|
|
@@ -481,19 +481,19 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
481
481
|
this.effect = '';
|
|
482
482
|
switch (e.action) {
|
|
483
483
|
case 'moveLeft':
|
|
484
|
-
if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(
|
|
484
|
+
if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
|
|
485
485
|
this.keyboardNavigate(-1, view, e, this.max, this.min);
|
|
486
486
|
e.preventDefault();
|
|
487
487
|
}
|
|
488
488
|
break;
|
|
489
489
|
case 'moveRight':
|
|
490
|
-
if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(
|
|
490
|
+
if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
|
|
491
491
|
this.keyboardNavigate(1, view, e, this.max, this.min);
|
|
492
492
|
e.preventDefault();
|
|
493
493
|
}
|
|
494
494
|
break;
|
|
495
495
|
case 'moveUp':
|
|
496
|
-
if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(
|
|
496
|
+
if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
|
|
497
497
|
if (view === 0) {
|
|
498
498
|
this.keyboardNavigate(-7, view, e, this.max, this.min); // move the current date to the previous seven days.
|
|
499
499
|
}
|
|
@@ -504,7 +504,7 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
504
504
|
}
|
|
505
505
|
break;
|
|
506
506
|
case 'moveDown':
|
|
507
|
-
if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(
|
|
507
|
+
if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
|
|
508
508
|
if (view === 0) {
|
|
509
509
|
this.keyboardNavigate(7, view, e, this.max, this.min);
|
|
510
510
|
}
|
|
@@ -5407,7 +5407,6 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5407
5407
|
this.invalidValueString = null;
|
|
5408
5408
|
this.isAngular = false;
|
|
5409
5409
|
this.preventChange = false;
|
|
5410
|
-
this.isKeyPressed = false;
|
|
5411
5410
|
this.dateRangeOptions = options;
|
|
5412
5411
|
}
|
|
5413
5412
|
/**
|
|
@@ -5758,7 +5757,6 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5758
5757
|
EventHandler.add(this.inputElement, 'focus', this.inputFocusHandler, this);
|
|
5759
5758
|
EventHandler.add(this.inputElement, 'blur', this.inputBlurHandler, this);
|
|
5760
5759
|
EventHandler.add(this.inputElement, 'change', this.inputChangeHandler, this);
|
|
5761
|
-
EventHandler.add(this.inputElement, 'keyup', this.keyupHandler, this);
|
|
5762
5760
|
if (this.showClearButton && this.inputWrapper.clearButton) {
|
|
5763
5761
|
EventHandler.add(this.inputWrapper.clearButton, 'mousedown', this.resetHandler, this);
|
|
5764
5762
|
}
|
|
@@ -5785,7 +5783,6 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5785
5783
|
EventHandler.remove(this.inputElement, 'blur', this.inputBlurHandler);
|
|
5786
5784
|
EventHandler.remove(this.inputElement, 'focus', this.inputFocusHandler);
|
|
5787
5785
|
EventHandler.remove(this.inputElement, 'change', this.inputChangeHandler);
|
|
5788
|
-
EventHandler.remove(this.inputElement, 'keyup', this.keyupHandler);
|
|
5789
5786
|
if (this.showClearButton && this.inputWrapper.clearButton) {
|
|
5790
5787
|
EventHandler.remove(this.inputWrapper.clearButton, 'mousedown touchstart', this.resetHandler);
|
|
5791
5788
|
}
|
|
@@ -6039,8 +6036,8 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6039
6036
|
const startDate = this.presetsItem[i].start;
|
|
6040
6037
|
const endDate = this.presetsItem[i].end;
|
|
6041
6038
|
if (this.startValue && this.endValue) {
|
|
6042
|
-
if ((
|
|
6043
|
-
|
|
6039
|
+
if (startDate.getDate() == this.startValue.getDate() && startDate.getMonth() == this.startValue.getMonth() && startDate.getFullYear() == this.startValue.getFullYear()
|
|
6040
|
+
&& endDate.getDate() == this.endValue.getDate() && endDate.getMonth() == this.endValue.getMonth() && endDate.getFullYear() == this.endValue.getFullYear()) {
|
|
6044
6041
|
this.activeIndex = i;
|
|
6045
6042
|
this.isCustomRange = false;
|
|
6046
6043
|
}
|
|
@@ -8004,9 +8001,6 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
8004
8001
|
this.startButton.element.classList.add(ACTIVE$1);
|
|
8005
8002
|
}
|
|
8006
8003
|
}
|
|
8007
|
-
keyupHandler(e) {
|
|
8008
|
-
this.isKeyPressed = (this.inputElement.value !== this.previousEleValue) ? true : false;
|
|
8009
|
-
}
|
|
8010
8004
|
applyFunction(eve) {
|
|
8011
8005
|
let isValueChanged = false;
|
|
8012
8006
|
if (eve.type !== 'touchstart') {
|
|
@@ -8029,13 +8023,15 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
8029
8023
|
eve.preventDefault();
|
|
8030
8024
|
}
|
|
8031
8025
|
if (!isNullOrUndefined(this.startValue) && !isNullOrUndefined(this.endValue)) {
|
|
8026
|
+
if (!(this.previousStartValue && this.previousEndValue && this.startValue.getDate() == this.previousStartValue.getDate() && this.startValue.getMonth() == this.previousStartValue.getMonth() &&
|
|
8027
|
+
this.startValue.getFullYear() == this.previousStartValue.getFullYear()
|
|
8028
|
+
&& this.endValue.getDate() == this.previousEndValue.getDate() && this.endValue.getMonth() == this.previousEndValue.getMonth()
|
|
8029
|
+
&& this.endValue.getFullYear() == this.previousEndValue.getFullYear())) {
|
|
8030
|
+
Input.setValue(this.rangeArgs(eve).text, this.inputElement, this.floatLabelType, this.showClearButton);
|
|
8031
|
+
}
|
|
8032
8032
|
this.previousStartValue = new Date(+this.startValue);
|
|
8033
8033
|
this.previousEndValue = new Date(+this.endValue);
|
|
8034
8034
|
this.previousEleValue = this.inputElement.value;
|
|
8035
|
-
if (!this.isKeyPressed) {
|
|
8036
|
-
Input.setValue(this.rangeArgs(eve).text, this.inputElement, this.floatLabelType, this.showClearButton);
|
|
8037
|
-
}
|
|
8038
|
-
this.isKeyPressed = false;
|
|
8039
8035
|
if (+this.initStartDate !== +this.startValue || +this.initEndDate !== +this.endValue) {
|
|
8040
8036
|
isValueChanged = true;
|
|
8041
8037
|
}
|
|
@@ -14455,6 +14451,7 @@ class MaskedDateTime {
|
|
|
14455
14451
|
{
|
|
14456
14452
|
let year = (this.isYearPart && (newDateValue.getFullYear().toString().length < 4
|
|
14457
14453
|
&& !this.isShortYear) ? newDateValue.getFullYear() * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
14454
|
+
let yearValue = (this.dateformat.match(/y/g) || []).length;
|
|
14458
14455
|
this.isShortYear = false;
|
|
14459
14456
|
this.isYearZero = (newVal[start - 1] === '0');
|
|
14460
14457
|
if (isNaN(year)) {
|
|
@@ -14468,7 +14465,7 @@ class MaskedDateTime {
|
|
|
14468
14465
|
}
|
|
14469
14466
|
else {
|
|
14470
14467
|
newDateValue.setFullYear(year);
|
|
14471
|
-
if (year.toString().length ===
|
|
14468
|
+
if (year.toString().length === yearValue) {
|
|
14472
14469
|
this.isNavigate = true;
|
|
14473
14470
|
}
|
|
14474
14471
|
this.previousDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth(), newDateValue.getDate());
|
|
@@ -14643,9 +14640,6 @@ class MaskedDateTime {
|
|
|
14643
14640
|
case 'yy':
|
|
14644
14641
|
result = proxy.isYearPart ? proxy.roundOff(proxy.maskDateValue.getFullYear() % 100, 2) : proxy.defaultConstant['year'].toString();
|
|
14645
14642
|
result = proxy.zeroCheck(proxy.isYearZero, proxy.isYearPart, result);
|
|
14646
|
-
if (proxy.isYearPart) {
|
|
14647
|
-
proxy.isNavigate = proxy.isShortYear = (proxy.maskDateValue.getFullYear() % 100).toString().length === 2;
|
|
14648
|
-
}
|
|
14649
14643
|
break;
|
|
14650
14644
|
case 'y':
|
|
14651
14645
|
case 'yyyy':
|