@syncfusion/ej2-calendars 29.1.35 → 29.1.39

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.
@@ -1431,12 +1431,18 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
1431
1431
  for (var skipIndex = 0; skipIndex < copyValues.length; skipIndex++) {
1432
1432
  var tempValue = copyValues[skipIndex];
1433
1433
  var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
1434
+ var tempValueFormat = void 0;
1434
1435
  var tempValueString = void 0;
1436
+ var tempValueDate = void 0;
1435
1437
  if (this.calendarMode === 'Gregorian') {
1436
- tempValueString = this.globalize.formatDate(tempValue, { type: 'date', skeleton: 'yMd' });
1438
+ tempValueFormat = { type: 'date', skeleton: 'yMd' };
1439
+ tempValueString = this.globalize.formatDate(tempValue, tempValueFormat);
1440
+ tempValueDate = this.globalize.parseDate(tempValueString, tempValueFormat);
1437
1441
  }
1438
1442
  else {
1439
- tempValueString = this.globalize.formatDate(tempValue, { type: 'dateTime', skeleton: 'full', calendar: 'islamic' });
1443
+ tempValueFormat = { type: 'date', skeleton: 'yMd', calendar: 'islamic' };
1444
+ tempValueString = this.globalize.formatDate(tempValue, tempValueFormat);
1445
+ tempValueDate = this.globalize.parseDate(tempValueString, tempValueFormat);
1440
1446
  }
1441
1447
  var minFormatOption = { type: 'date', skeleton: 'yMd', calendar: type };
1442
1448
  var minStringValue = this.globalize.formatDate(this.min, minFormatOption);
@@ -1444,8 +1450,9 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
1444
1450
  var maxFormatOption = { type: 'date', skeleton: 'yMd', calendar: type };
1445
1451
  var maxStringValue = this.globalize.formatDate(this.max, maxFormatOption);
1446
1452
  var maxString = maxStringValue;
1447
- if (+new Date(tempValueString) < +new Date(minString) ||
1448
- +new Date(tempValueString) > +new Date(maxString)) {
1453
+ var minDate = this.globalize.parseDate(minString, minFormatOption);
1454
+ var maxDate = this.globalize.parseDate(maxString, maxFormatOption);
1455
+ if (+tempValueDate < +minDate || +tempValueDate > +maxDate) {
1449
1456
  copyValues.splice(skipIndex, 1);
1450
1457
  skipIndex = -1;
1451
1458
  }
@@ -12124,7 +12131,8 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
12124
12131
  var formatStr = null;
12125
12132
  var today = this.globalize.formatDate(new Date(), { format: formatStr, skeleton: 'short', type: 'date' });
12126
12133
  var value = null;
12127
- if (typeof val === 'string') {
12134
+ if (typeof val === 'string' && !(this.enableMask && this.maskedDateValue &&
12135
+ this.inputElement.value === this.maskedDateValue && !this.value)) {
12128
12136
  if (val.toUpperCase().indexOf('AM') > -1 || val.toUpperCase().indexOf('PM') > -1) {
12129
12137
  today = this.defaultCulture.formatDate(new Date(), { format: formatStr, skeleton: 'short', type: 'date' });
12130
12138
  value = isNaN(+new Date(today + ' ' + val)) ? null : new Date(new Date(today + ' ' + val).setMilliseconds(0));