@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.
@@ -3700,9 +3700,10 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3700
3700
  case 'ArrowDown':
3701
3701
  case 'Home':
3702
3702
  case 'End':
3703
+ case 'Backspace':
3703
3704
  case 'Delete':
3704
3705
  if (this.enableMask && !this.popupObj && !this.readonly) {
3705
- if (e.code !== 'Delete') {
3706
+ if (e.code !== 'Delete' && e.code !== 'Backspace') {
3706
3707
  e.preventDefault();
3707
3708
  }
3708
3709
  this.notify('keyDownHandler', {
@@ -14615,6 +14616,32 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14615
14616
  this.parent.inputElement.setSelectionRange(start, end);
14616
14617
  };
14617
14618
  MaskedDateTime.prototype.maskKeydownHandler = function (args) {
14619
+ if (args.e.key === 'Backspace') {
14620
+ var start = this.parent.inputElement.selectionStart;
14621
+ var formatText = '';
14622
+ if (this.validCharacters.indexOf(this.hiddenMask[start]) !== -1) {
14623
+ formatText = this.hiddenMask[start];
14624
+ }
14625
+ switch (formatText) {
14626
+ case 'd':
14627
+ this.dayTypeCount = Math.max(this.dayTypeCount - 1, 0);
14628
+ break;
14629
+ case 'M':
14630
+ this.monthTypeCount = Math.max(this.monthTypeCount - 1, 0);
14631
+ break;
14632
+ case 'H':
14633
+ case 'h':
14634
+ this.hourTypeCount = Math.max(this.hourTypeCount - 1, 0);
14635
+ break;
14636
+ case 'm':
14637
+ this.minuteTypeCount = Math.max(this.minuteTypeCount - 1, 0);
14638
+ break;
14639
+ case 's':
14640
+ this.secondTypeCount = Math.max(this.secondTypeCount - 1, 0);
14641
+ break;
14642
+ }
14643
+ return;
14644
+ }
14618
14645
  this.dayTypeCount = this.monthTypeCount = this.hourTypeCount = this.minuteTypeCount = this.secondTypeCount = 0;
14619
14646
  if (args.e.key === 'Delete') {
14620
14647
  this.isDeleteKey = true;