@syncfusion/ej2-calendars 27.2.2 → 27.2.3
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/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 +21 -0
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +21 -0
- 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 +6 -6
- package/src/datepicker/datepicker.js +6 -0
- package/src/maskbase/interface.d.ts +2 -0
- package/src/maskbase/masked-date-time.js +3 -0
- package/src/timepicker/timepicker.d.ts +1 -0
- package/src/timepicker/timepicker.js +12 -0
|
@@ -3897,6 +3897,9 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3897
3897
|
this.inputElement.selectionEnd = this.inputElement.value.length;
|
|
3898
3898
|
}
|
|
3899
3899
|
}
|
|
3900
|
+
if (this.enableMask && this.showClearButton && this.inputElement && this.inputElement.value === this.maskedDateValue && this.inputWrapper && this.inputWrapper.clearButton && !this.inputWrapper.clearButton.classList.contains('e-clear-icon-hide')) {
|
|
3901
|
+
this.inputWrapper.clearButton.classList.add('e-clear-icon-hide');
|
|
3902
|
+
}
|
|
3900
3903
|
const focusArguments = {
|
|
3901
3904
|
model: this
|
|
3902
3905
|
};
|
|
@@ -4402,6 +4405,9 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4402
4405
|
}
|
|
4403
4406
|
keyupHandler(e) {
|
|
4404
4407
|
this.isKeyAction = (this.inputElement.value !== this.previousElementValue) ? true : false;
|
|
4408
|
+
if (this.enableMask && this.showClearButton && this.inputElement && this.inputElement.value === this.maskedDateValue && this.inputWrapper && this.inputWrapper.clearButton && !this.inputWrapper.clearButton.classList.contains('e-clear-icon-hide')) {
|
|
4409
|
+
this.inputWrapper.clearButton.classList.add('e-clear-icon-hide');
|
|
4410
|
+
}
|
|
4405
4411
|
}
|
|
4406
4412
|
changeEvent(event) {
|
|
4407
4413
|
if (!this.isIconClicked && !(this.isBlur || this.isKeyAction)) {
|
|
@@ -11246,6 +11252,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11246
11252
|
EventHandler.add(this.inputElement, 'input', this.inputEventHandler, this);
|
|
11247
11253
|
if (this.enableMask) {
|
|
11248
11254
|
EventHandler.add(this.inputElement, 'keydown', this.keydownHandler, this);
|
|
11255
|
+
EventHandler.add(this.inputElement, 'keyup', this.keyupHandler, this);
|
|
11249
11256
|
}
|
|
11250
11257
|
if (this.showClearButton && this.inputWrapper.clearButton) {
|
|
11251
11258
|
EventHandler.add(this.inputWrapper.clearButton, 'mousedown', this.clearHandler, this);
|
|
@@ -11277,6 +11284,11 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11277
11284
|
break;
|
|
11278
11285
|
}
|
|
11279
11286
|
}
|
|
11287
|
+
keyupHandler(e) {
|
|
11288
|
+
if ((e.code === 'Backspace' || e.code === 'Delete') && (this.enableMask && this.showClearButton && this.inputElement && this.inputElement.value === this.maskedDateValue && this.inputWrapper && this.inputWrapper.clearButton && !this.inputWrapper.clearButton.classList.contains('e-clear-icon-hide'))) {
|
|
11289
|
+
this.inputWrapper.clearButton.classList.add('e-clear-icon-hide');
|
|
11290
|
+
}
|
|
11291
|
+
}
|
|
11280
11292
|
formResetHandler() {
|
|
11281
11293
|
if (!this.enabled) {
|
|
11282
11294
|
return;
|
|
@@ -11327,6 +11339,9 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11327
11339
|
EventHandler.remove(this.inputElement, 'focus', this.inputFocusHandler);
|
|
11328
11340
|
EventHandler.remove(this.inputElement, 'change', this.inputChangeHandler);
|
|
11329
11341
|
EventHandler.remove(this.inputElement, 'input', this.inputEventHandler);
|
|
11342
|
+
if (this.enableMask) {
|
|
11343
|
+
EventHandler.remove(this.inputElement, 'keyup', this.keyupHandler);
|
|
11344
|
+
}
|
|
11330
11345
|
if (this.inputEvent) {
|
|
11331
11346
|
this.inputEvent.destroy();
|
|
11332
11347
|
}
|
|
@@ -12073,6 +12088,9 @@ let TimePicker = class TimePicker extends Component {
|
|
|
12073
12088
|
this.inputElement.selectionEnd = this.inputElement.value.length;
|
|
12074
12089
|
}
|
|
12075
12090
|
}
|
|
12091
|
+
if (this.enableMask && this.showClearButton && this.inputElement && this.inputElement.value === this.maskedDateValue && this.inputWrapper && this.inputWrapper.clearButton && !this.inputWrapper.clearButton.classList.contains('e-clear-icon-hide')) {
|
|
12092
|
+
this.inputWrapper.clearButton.classList.add('e-clear-icon-hide');
|
|
12093
|
+
}
|
|
12076
12094
|
this.trigger('focus', focusArguments);
|
|
12077
12095
|
this.clearIconState();
|
|
12078
12096
|
if (this.openOnFocus) {
|
|
@@ -15217,6 +15235,9 @@ class MaskedDateTime {
|
|
|
15217
15235
|
clearHandler() {
|
|
15218
15236
|
this.isDayPart = this.isMonthPart = this.isYearPart = this.isHourPart = this.isMinutePart = this.isSecondsPart = false;
|
|
15219
15237
|
this.updateValue();
|
|
15238
|
+
if (this.parent.inputElement && this.parent.inputElement.value === this.parent.maskedDateValue && this.parent.inputWrapper && this.parent.inputWrapper.clearButton && !this.parent.inputWrapper.clearButton.classList.contains('e-clear-icon-hide')) {
|
|
15239
|
+
this.parent.inputWrapper.clearButton.classList.add('e-clear-icon-hide');
|
|
15240
|
+
}
|
|
15220
15241
|
}
|
|
15221
15242
|
updateValue() {
|
|
15222
15243
|
this.monthCharacter = this.periodCharacter = '';
|