@syncfusion/ej2-calendars 22.2.11 → 22.2.12
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 +20 -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 +23 -4
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +23 -4
- 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 +7 -7
- package/src/datepicker/datepicker.d.ts +2 -0
- package/src/datepicker/datepicker.js +9 -1
- package/src/daterangepicker/daterangepicker.d.ts +2 -0
- package/src/daterangepicker/daterangepicker.js +10 -1
- package/src/timepicker/timepicker.js +4 -2
- package/styles/calendar/material-dark.css +1 -1
- package/styles/datepicker/material-dark.css +1 -1
- package/styles/daterangepicker/material-dark.css +1 -1
- package/styles/datetimepicker/material-dark.css +1 -1
- package/styles/material-dark.css +1 -1
- package/styles/timepicker/material-dark.css +1 -1
|
@@ -3245,6 +3245,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
3245
3245
|
_this.moduleName = _this.getModuleName();
|
|
3246
3246
|
_this.isFocused = false;
|
|
3247
3247
|
_this.isBlur = false;
|
|
3248
|
+
_this.isKeyAction = false;
|
|
3248
3249
|
_this.datepickerOptions = options;
|
|
3249
3250
|
return _this;
|
|
3250
3251
|
}
|
|
@@ -3575,6 +3576,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
3575
3576
|
EventHandler.add(this.inputElement, 'mouseup', this.mouseUpHandler, this);
|
|
3576
3577
|
EventHandler.add(this.inputElement, 'focus', this.inputFocusHandler, this);
|
|
3577
3578
|
EventHandler.add(this.inputElement, 'blur', this.inputBlurHandler, this);
|
|
3579
|
+
EventHandler.add(this.inputElement, 'keyup', this.keyupHandler, this);
|
|
3578
3580
|
if (this.enableMask) {
|
|
3579
3581
|
EventHandler.add(this.inputElement, 'keydown', this.keydownHandler, this);
|
|
3580
3582
|
}
|
|
@@ -3625,6 +3627,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
3625
3627
|
EventHandler.remove(this.inputElement, 'focus', this.inputFocusHandler);
|
|
3626
3628
|
EventHandler.remove(this.inputElement, 'blur', this.inputBlurHandler);
|
|
3627
3629
|
EventHandler.remove(this.inputElement, 'change', this.inputChangeHandler);
|
|
3630
|
+
EventHandler.remove(this.inputElement, 'keyup', this.keyupHandler);
|
|
3628
3631
|
if (this.enableMask) {
|
|
3629
3632
|
EventHandler.remove(this.inputElement, 'keydown', this.keydownHandler);
|
|
3630
3633
|
}
|
|
@@ -4316,12 +4319,16 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
4316
4319
|
this.isInteracted = true;
|
|
4317
4320
|
}
|
|
4318
4321
|
}
|
|
4322
|
+
this.isKeyAction = false;
|
|
4319
4323
|
};
|
|
4320
4324
|
DatePicker.prototype.navigatedEvent = function () {
|
|
4321
4325
|
this.trigger('navigated', this.navigatedArgs);
|
|
4322
4326
|
};
|
|
4327
|
+
DatePicker.prototype.keyupHandler = function (e) {
|
|
4328
|
+
this.isKeyAction = (this.inputElement.value !== this.previousElementValue) ? true : false;
|
|
4329
|
+
};
|
|
4323
4330
|
DatePicker.prototype.changeEvent = function (event) {
|
|
4324
|
-
if (!this.isIconClicked && !this.isBlur) {
|
|
4331
|
+
if (!this.isIconClicked && !(this.isBlur || this.isKeyAction)) {
|
|
4325
4332
|
this.selectCalendar(event);
|
|
4326
4333
|
}
|
|
4327
4334
|
if (((this.previousDate && this.previousDate.valueOf()) !== (this.value && this.value.valueOf()))) {
|
|
@@ -4341,6 +4348,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
4341
4348
|
else if (event) {
|
|
4342
4349
|
this.hide(event);
|
|
4343
4350
|
}
|
|
4351
|
+
this.isKeyAction = false;
|
|
4344
4352
|
};
|
|
4345
4353
|
DatePicker.prototype.requiredModules = function () {
|
|
4346
4354
|
var modules = [];
|
|
@@ -5375,6 +5383,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
5375
5383
|
_this.invalidValueString = null;
|
|
5376
5384
|
_this.isAngular = false;
|
|
5377
5385
|
_this.preventChange = false;
|
|
5386
|
+
_this.isKeyPressed = false;
|
|
5378
5387
|
_this.dateRangeOptions = options;
|
|
5379
5388
|
return _this;
|
|
5380
5389
|
}
|
|
@@ -5730,6 +5739,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
5730
5739
|
EventHandler.add(this.inputElement, 'focus', this.inputFocusHandler, this);
|
|
5731
5740
|
EventHandler.add(this.inputElement, 'blur', this.inputBlurHandler, this);
|
|
5732
5741
|
EventHandler.add(this.inputElement, 'change', this.inputChangeHandler, this);
|
|
5742
|
+
EventHandler.add(this.inputElement, 'keyup', this.keyupHandler, this);
|
|
5733
5743
|
if (this.showClearButton && this.inputWrapper.clearButton) {
|
|
5734
5744
|
EventHandler.add(this.inputWrapper.clearButton, 'mousedown', this.resetHandler, this);
|
|
5735
5745
|
}
|
|
@@ -5756,6 +5766,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
5756
5766
|
EventHandler.remove(this.inputElement, 'blur', this.inputBlurHandler);
|
|
5757
5767
|
EventHandler.remove(this.inputElement, 'focus', this.inputFocusHandler);
|
|
5758
5768
|
EventHandler.remove(this.inputElement, 'change', this.inputChangeHandler);
|
|
5769
|
+
EventHandler.remove(this.inputElement, 'keyup', this.keyupHandler);
|
|
5759
5770
|
if (this.showClearButton && this.inputWrapper.clearButton) {
|
|
5760
5771
|
EventHandler.remove(this.inputWrapper.clearButton, 'mousedown touchstart', this.resetHandler);
|
|
5761
5772
|
}
|
|
@@ -7981,6 +7992,9 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
7981
7992
|
this.startButton.element.classList.add(ACTIVE$1);
|
|
7982
7993
|
}
|
|
7983
7994
|
};
|
|
7995
|
+
DateRangePicker.prototype.keyupHandler = function (e) {
|
|
7996
|
+
this.isKeyPressed = (this.inputElement.value !== this.previousEleValue) ? true : false;
|
|
7997
|
+
};
|
|
7984
7998
|
DateRangePicker.prototype.applyFunction = function (eve) {
|
|
7985
7999
|
var isValueChanged = false;
|
|
7986
8000
|
if (eve.type !== 'touchstart') {
|
|
@@ -8006,7 +8020,10 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
8006
8020
|
this.previousStartValue = new Date(+this.startValue);
|
|
8007
8021
|
this.previousEndValue = new Date(+this.endValue);
|
|
8008
8022
|
this.previousEleValue = this.inputElement.value;
|
|
8009
|
-
|
|
8023
|
+
if (!this.isKeyPressed) {
|
|
8024
|
+
Input.setValue(this.rangeArgs(eve).text, this.inputElement, this.floatLabelType, this.showClearButton);
|
|
8025
|
+
}
|
|
8026
|
+
this.isKeyPressed = false;
|
|
8010
8027
|
if (+this.initStartDate !== +this.startValue || +this.initEndDate !== +this.endValue) {
|
|
8011
8028
|
isValueChanged = true;
|
|
8012
8029
|
}
|
|
@@ -10815,7 +10832,7 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
10815
10832
|
};
|
|
10816
10833
|
TimePicker.prototype.inputHandler = function (event) {
|
|
10817
10834
|
if (!this.readonly && this.enabled) {
|
|
10818
|
-
if (!((event.action == 'right' || event.action == 'left' || event.action == 'tab') || ((event.action == 'home' || event.action == 'end') && !this.isPopupOpen()))) {
|
|
10835
|
+
if (!((event.action == 'right' || event.action == 'left' || event.action == 'tab') || ((event.action == 'home' || event.action == 'end' || event.action == 'up' || event.action == 'down') && !this.isPopupOpen() && !this.enableMask))) {
|
|
10819
10836
|
event.preventDefault();
|
|
10820
10837
|
}
|
|
10821
10838
|
switch (event.action) {
|
|
@@ -11618,7 +11635,9 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
11618
11635
|
this.isNavigate = true;
|
|
11619
11636
|
this.setHover(this.selectedElement, NAVIGATION);
|
|
11620
11637
|
this.setActiveDescendant();
|
|
11621
|
-
this.
|
|
11638
|
+
if (this.enableMask) {
|
|
11639
|
+
this.selectInputText();
|
|
11640
|
+
}
|
|
11622
11641
|
if (this.isPopupOpen() && this.selectedElement !== null && (!event || event.type !== 'click')) {
|
|
11623
11642
|
this.setScrollPosition();
|
|
11624
11643
|
}
|