@syncfusion/ej2-calendars 27.1.50 → 27.1.51

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.
@@ -3659,9 +3659,10 @@ let DatePicker = class DatePicker extends Calendar {
3659
3659
  case 'ArrowDown':
3660
3660
  case 'Home':
3661
3661
  case 'End':
3662
+ case 'Backspace':
3662
3663
  case 'Delete':
3663
3664
  if (this.enableMask && !this.popupObj && !this.readonly) {
3664
- if (e.code !== 'Delete') {
3665
+ if (e.code !== 'Delete' && e.code !== 'Backspace') {
3665
3666
  e.preventDefault();
3666
3667
  }
3667
3668
  this.notify('keyDownHandler', {
@@ -14467,6 +14468,32 @@ class MaskedDateTime {
14467
14468
  this.parent.inputElement.setSelectionRange(start, end);
14468
14469
  }
14469
14470
  maskKeydownHandler(args) {
14471
+ if (args.e.key === 'Backspace') {
14472
+ const start = this.parent.inputElement.selectionStart;
14473
+ let formatText = '';
14474
+ if (this.validCharacters.indexOf(this.hiddenMask[start]) !== -1) {
14475
+ formatText = this.hiddenMask[start];
14476
+ }
14477
+ switch (formatText) {
14478
+ case 'd':
14479
+ this.dayTypeCount = Math.max(this.dayTypeCount - 1, 0);
14480
+ break;
14481
+ case 'M':
14482
+ this.monthTypeCount = Math.max(this.monthTypeCount - 1, 0);
14483
+ break;
14484
+ case 'H':
14485
+ case 'h':
14486
+ this.hourTypeCount = Math.max(this.hourTypeCount - 1, 0);
14487
+ break;
14488
+ case 'm':
14489
+ this.minuteTypeCount = Math.max(this.minuteTypeCount - 1, 0);
14490
+ break;
14491
+ case 's':
14492
+ this.secondTypeCount = Math.max(this.secondTypeCount - 1, 0);
14493
+ break;
14494
+ }
14495
+ return;
14496
+ }
14470
14497
  this.dayTypeCount = this.monthTypeCount = this.hourTypeCount = this.minuteTypeCount = this.secondTypeCount = 0;
14471
14498
  if (args.e.key === 'Delete') {
14472
14499
  this.isDeleteKey = true;