@syncfusion/ej2-calendars 29.1.35 → 29.1.40

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.
@@ -225,7 +225,7 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
225
225
  'aria-label': 'next month'
226
226
  };
227
227
  var ariaTitleAttrs = {
228
- 'aria-atomic': 'true', 'aria-live': 'assertive', 'aria-label': 'title'
228
+ 'aria-atomic': 'true', 'aria-live': 'assertive'
229
229
  };
230
230
  var tabIndexAttr = { 'tabindex': '0' };
231
231
  this.headerElement = this.createElement('div', { className: HEADER });
@@ -1047,7 +1047,7 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
1047
1047
  value = date.valueOf();
1048
1048
  }
1049
1049
  var attrs = {
1050
- className: CELL, attrs: { 'id': '' + getUniqueID('' + value), 'aria-selected': 'false' }
1050
+ className: CELL, attrs: { 'id': '' + getUniqueID('' + value) }
1051
1051
  };
1052
1052
  return this.createElement('td', attrs);
1053
1053
  };
@@ -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
  }
@@ -3371,6 +3378,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3371
3378
  timeZoneDiff = this.isDayLightSaving() ? timeZoneDiff-- : timeZoneDiff;
3372
3379
  this.value = new Date((this.value).getTime() + (timeZoneDiff * 60 * 60 * 1000));
3373
3380
  this.updateInput();
3381
+ this.changeTrigger(null);
3374
3382
  }
3375
3383
  };
3376
3384
  DatePicker.prototype.isDayLightSaving = function () {
@@ -8197,7 +8205,6 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
8197
8205
  var labelContainer = this.createRangeHeader();
8198
8206
  headerContainer.appendChild(labelContainer);
8199
8207
  var daySpan = this.createElement('div', { className: DAYSPAN });
8200
- attributes(daySpan, { 'aria-label': 'Selected Days' });
8201
8208
  daySpan.textContent = this.l10n.getConstant('selectedDays');
8202
8209
  headerContainer.appendChild(daySpan);
8203
8210
  var separator = this.createElement('div', { className: SEPARATOR });
@@ -8961,8 +8968,11 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
8961
8968
  attributes(this.inputElement, {
8962
8969
  'tabindex': '0', 'aria-expanded': 'false', 'role': 'combobox',
8963
8970
  'autocomplete': 'off', 'aria-disabled': !this.enabled ? 'true' : 'false',
8964
- 'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false'
8971
+ 'autocapitalize': 'off', 'spellcheck': 'false'
8965
8972
  });
8973
+ if (Browser.isIos) {
8974
+ attributes(this.inputElement, { 'autocorrect': 'off' });
8975
+ }
8966
8976
  Input.addAttributes({ 'aria-label': 'select', 'role': 'button' }, this.inputWrapper.buttons[0]);
8967
8977
  // if (!isNullOrUndefined(this.placeholder) && this.placeholder.trim() !== '') {
8968
8978
  // Input.addAttributes({ 'aria-placeholder': this.placeholder }, this.inputElement);
@@ -12124,7 +12134,8 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
12124
12134
  var formatStr = null;
12125
12135
  var today = this.globalize.formatDate(new Date(), { format: formatStr, skeleton: 'short', type: 'date' });
12126
12136
  var value = null;
12127
- if (typeof val === 'string') {
12137
+ if (typeof val === 'string' && !(this.enableMask && this.maskedDateValue &&
12138
+ this.inputElement.value === this.maskedDateValue && !this.value)) {
12128
12139
  if (val.toUpperCase().indexOf('AM') > -1 || val.toUpperCase().indexOf('PM') > -1) {
12129
12140
  today = this.defaultCulture.formatDate(new Date(), { format: formatStr, skeleton: 'short', type: 'date' });
12130
12141
  value = isNaN(+new Date(today + ' ' + val)) ? null : new Date(new Date(today + ' ' + val).setMilliseconds(0));