@syncfusion/ej2-calendars 27.1.57 → 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 +42 -0
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +43 -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 +10 -10
- package/src/datepicker/datepicker.js +12 -0
- package/src/daterangepicker/daterangepicker.js +16 -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
|
@@ -3940,6 +3940,9 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
3940
3940
|
this.inputElement.selectionEnd = this.inputElement.value.length;
|
|
3941
3941
|
}
|
|
3942
3942
|
}
|
|
3943
|
+
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')) {
|
|
3944
|
+
this.inputWrapper.clearButton.classList.add('e-clear-icon-hide');
|
|
3945
|
+
}
|
|
3943
3946
|
var focusArguments = {
|
|
3944
3947
|
model: this
|
|
3945
3948
|
};
|
|
@@ -4446,6 +4449,9 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
4446
4449
|
};
|
|
4447
4450
|
DatePicker.prototype.keyupHandler = function (e) {
|
|
4448
4451
|
this.isKeyAction = (this.inputElement.value !== this.previousElementValue) ? true : false;
|
|
4452
|
+
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')) {
|
|
4453
|
+
this.inputWrapper.clearButton.classList.add('e-clear-icon-hide');
|
|
4454
|
+
}
|
|
4449
4455
|
};
|
|
4450
4456
|
DatePicker.prototype.changeEvent = function (event) {
|
|
4451
4457
|
if (!this.isIconClicked && !(this.isBlur || this.isKeyAction)) {
|
|
@@ -5287,6 +5293,12 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
5287
5293
|
if (this.calendarElement && this.isCalendar()) {
|
|
5288
5294
|
_super.prototype.onPropertyChanged.call(this, newProp, oldProp);
|
|
5289
5295
|
}
|
|
5296
|
+
if (prop === 'min' && isNullOrUndefined(this.min)) {
|
|
5297
|
+
this.min = new Date(1900, 0, 1);
|
|
5298
|
+
}
|
|
5299
|
+
if (prop === 'max' && isNullOrUndefined(this.max)) {
|
|
5300
|
+
this.max = new Date(2099, 11, 31);
|
|
5301
|
+
}
|
|
5290
5302
|
break;
|
|
5291
5303
|
}
|
|
5292
5304
|
if (!this.isDynamicValueChanged) {
|
|
@@ -8306,10 +8318,26 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
8306
8318
|
}
|
|
8307
8319
|
};
|
|
8308
8320
|
DateRangePicker.prototype.renderCustomPopup = function () {
|
|
8321
|
+
var _this = this;
|
|
8309
8322
|
this.isCustomWindow = true;
|
|
8310
8323
|
this.popupObj.hide();
|
|
8311
8324
|
this.popupWrapper = this.createElement('div', { id: this.element.id + '_popup', className: ROOT$2 + ' ' + POPUP$1 });
|
|
8312
8325
|
this.renderControl();
|
|
8326
|
+
this.openEventArgs = {
|
|
8327
|
+
popup: this.popupObj || null,
|
|
8328
|
+
cancel: false,
|
|
8329
|
+
date: this.inputElement.value,
|
|
8330
|
+
model: this,
|
|
8331
|
+
event: event ? event : null,
|
|
8332
|
+
appendTo: this.isMobile || Browser.isDevice ? this.mobileRangePopupWrap : document.body
|
|
8333
|
+
};
|
|
8334
|
+
var eventArgs = this.openEventArgs;
|
|
8335
|
+
this.trigger('open', eventArgs, function (eventArgs) {
|
|
8336
|
+
_this.openEventArgs = eventArgs;
|
|
8337
|
+
if (_this.openEventArgs.cancel) {
|
|
8338
|
+
return;
|
|
8339
|
+
}
|
|
8340
|
+
});
|
|
8313
8341
|
this.openEventArgs.appendTo.appendChild(this.popupWrapper);
|
|
8314
8342
|
this.showPopup();
|
|
8315
8343
|
this.isCustomRange = true;
|
|
@@ -11346,6 +11374,7 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
11346
11374
|
EventHandler.add(this.inputElement, 'input', this.inputEventHandler, this);
|
|
11347
11375
|
if (this.enableMask) {
|
|
11348
11376
|
EventHandler.add(this.inputElement, 'keydown', this.keydownHandler, this);
|
|
11377
|
+
EventHandler.add(this.inputElement, 'keyup', this.keyupHandler, this);
|
|
11349
11378
|
}
|
|
11350
11379
|
if (this.showClearButton && this.inputWrapper.clearButton) {
|
|
11351
11380
|
EventHandler.add(this.inputWrapper.clearButton, 'mousedown', this.clearHandler, this);
|
|
@@ -11377,6 +11406,11 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
11377
11406
|
break;
|
|
11378
11407
|
}
|
|
11379
11408
|
};
|
|
11409
|
+
TimePicker.prototype.keyupHandler = function (e) {
|
|
11410
|
+
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'))) {
|
|
11411
|
+
this.inputWrapper.clearButton.classList.add('e-clear-icon-hide');
|
|
11412
|
+
}
|
|
11413
|
+
};
|
|
11380
11414
|
TimePicker.prototype.formResetHandler = function () {
|
|
11381
11415
|
if (!this.enabled) {
|
|
11382
11416
|
return;
|
|
@@ -11427,6 +11461,9 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
11427
11461
|
EventHandler.remove(this.inputElement, 'focus', this.inputFocusHandler);
|
|
11428
11462
|
EventHandler.remove(this.inputElement, 'change', this.inputChangeHandler);
|
|
11429
11463
|
EventHandler.remove(this.inputElement, 'input', this.inputEventHandler);
|
|
11464
|
+
if (this.enableMask) {
|
|
11465
|
+
EventHandler.remove(this.inputElement, 'keyup', this.keyupHandler);
|
|
11466
|
+
}
|
|
11430
11467
|
if (this.inputEvent) {
|
|
11431
11468
|
this.inputEvent.destroy();
|
|
11432
11469
|
}
|
|
@@ -12175,6 +12212,9 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12175
12212
|
this.inputElement.selectionEnd = this.inputElement.value.length;
|
|
12176
12213
|
}
|
|
12177
12214
|
}
|
|
12215
|
+
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')) {
|
|
12216
|
+
this.inputWrapper.clearButton.classList.add('e-clear-icon-hide');
|
|
12217
|
+
}
|
|
12178
12218
|
this.trigger('focus', focusArguments);
|
|
12179
12219
|
this.clearIconState();
|
|
12180
12220
|
if (this.openOnFocus) {
|
|
@@ -15345,6 +15385,9 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
|
|
|
15345
15385
|
MaskedDateTime.prototype.clearHandler = function () {
|
|
15346
15386
|
this.isDayPart = this.isMonthPart = this.isYearPart = this.isHourPart = this.isMinutePart = this.isSecondsPart = false;
|
|
15347
15387
|
this.updateValue();
|
|
15388
|
+
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')) {
|
|
15389
|
+
this.parent.inputWrapper.clearButton.classList.add('e-clear-icon-hide');
|
|
15390
|
+
}
|
|
15348
15391
|
};
|
|
15349
15392
|
MaskedDateTime.prototype.updateValue = function () {
|
|
15350
15393
|
this.monthCharacter = this.periodCharacter = '';
|