@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.
@@ -210,7 +210,7 @@ let CalendarBase = class CalendarBase extends Component {
210
210
  'aria-label': 'next month'
211
211
  };
212
212
  const ariaTitleAttrs = {
213
- 'aria-atomic': 'true', 'aria-live': 'assertive', 'aria-label': 'title'
213
+ 'aria-atomic': 'true', 'aria-live': 'assertive'
214
214
  };
215
215
  const tabIndexAttr = { 'tabindex': '0' };
216
216
  this.headerElement = this.createElement('div', { className: HEADER });
@@ -1030,7 +1030,7 @@ let CalendarBase = class CalendarBase extends Component {
1030
1030
  value = date.valueOf();
1031
1031
  }
1032
1032
  const attrs = {
1033
- className: CELL, attrs: { 'id': '' + getUniqueID('' + value), 'aria-selected': 'false' }
1033
+ className: CELL, attrs: { 'id': '' + getUniqueID('' + value) }
1034
1034
  };
1035
1035
  return this.createElement('td', attrs);
1036
1036
  }
@@ -1413,12 +1413,18 @@ let CalendarBase = class CalendarBase extends Component {
1413
1413
  for (let skipIndex = 0; skipIndex < copyValues.length; skipIndex++) {
1414
1414
  const tempValue = copyValues[skipIndex];
1415
1415
  const type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
1416
+ let tempValueFormat;
1416
1417
  let tempValueString;
1418
+ let tempValueDate;
1417
1419
  if (this.calendarMode === 'Gregorian') {
1418
- tempValueString = this.globalize.formatDate(tempValue, { type: 'date', skeleton: 'yMd' });
1420
+ tempValueFormat = { type: 'date', skeleton: 'yMd' };
1421
+ tempValueString = this.globalize.formatDate(tempValue, tempValueFormat);
1422
+ tempValueDate = this.globalize.parseDate(tempValueString, tempValueFormat);
1419
1423
  }
1420
1424
  else {
1421
- tempValueString = this.globalize.formatDate(tempValue, { type: 'dateTime', skeleton: 'full', calendar: 'islamic' });
1425
+ tempValueFormat = { type: 'date', skeleton: 'yMd', calendar: 'islamic' };
1426
+ tempValueString = this.globalize.formatDate(tempValue, tempValueFormat);
1427
+ tempValueDate = this.globalize.parseDate(tempValueString, tempValueFormat);
1422
1428
  }
1423
1429
  const minFormatOption = { type: 'date', skeleton: 'yMd', calendar: type };
1424
1430
  const minStringValue = this.globalize.formatDate(this.min, minFormatOption);
@@ -1426,8 +1432,9 @@ let CalendarBase = class CalendarBase extends Component {
1426
1432
  const maxFormatOption = { type: 'date', skeleton: 'yMd', calendar: type };
1427
1433
  const maxStringValue = this.globalize.formatDate(this.max, maxFormatOption);
1428
1434
  const maxString = maxStringValue;
1429
- if (+new Date(tempValueString) < +new Date(minString) ||
1430
- +new Date(tempValueString) > +new Date(maxString)) {
1435
+ const minDate = this.globalize.parseDate(minString, minFormatOption);
1436
+ const maxDate = this.globalize.parseDate(maxString, maxFormatOption);
1437
+ if (+tempValueDate < +minDate || +tempValueDate > +maxDate) {
1431
1438
  copyValues.splice(skipIndex, 1);
1432
1439
  skipIndex = -1;
1433
1440
  }
@@ -3332,6 +3339,7 @@ let DatePicker = class DatePicker extends Calendar {
3332
3339
  timeZoneDiff = this.isDayLightSaving() ? timeZoneDiff-- : timeZoneDiff;
3333
3340
  this.value = new Date((this.value).getTime() + (timeZoneDiff * 60 * 60 * 1000));
3334
3341
  this.updateInput();
3342
+ this.changeTrigger(null);
3335
3343
  }
3336
3344
  }
3337
3345
  isDayLightSaving() {
@@ -8103,7 +8111,6 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
8103
8111
  const labelContainer = this.createRangeHeader();
8104
8112
  headerContainer.appendChild(labelContainer);
8105
8113
  const daySpan = this.createElement('div', { className: DAYSPAN });
8106
- attributes(daySpan, { 'aria-label': 'Selected Days' });
8107
8114
  daySpan.textContent = this.l10n.getConstant('selectedDays');
8108
8115
  headerContainer.appendChild(daySpan);
8109
8116
  const separator = this.createElement('div', { className: SEPARATOR });
@@ -8864,8 +8871,11 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
8864
8871
  attributes(this.inputElement, {
8865
8872
  'tabindex': '0', 'aria-expanded': 'false', 'role': 'combobox',
8866
8873
  'autocomplete': 'off', 'aria-disabled': !this.enabled ? 'true' : 'false',
8867
- 'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false'
8874
+ 'autocapitalize': 'off', 'spellcheck': 'false'
8868
8875
  });
8876
+ if (Browser.isIos) {
8877
+ attributes(this.inputElement, { 'autocorrect': 'off' });
8878
+ }
8869
8879
  Input.addAttributes({ 'aria-label': 'select', 'role': 'button' }, this.inputWrapper.buttons[0]);
8870
8880
  // if (!isNullOrUndefined(this.placeholder) && this.placeholder.trim() !== '') {
8871
8881
  // Input.addAttributes({ 'aria-placeholder': this.placeholder }, this.inputElement);
@@ -11998,7 +12008,8 @@ let TimePicker = class TimePicker extends Component {
11998
12008
  const formatStr = null;
11999
12009
  let today = this.globalize.formatDate(new Date(), { format: formatStr, skeleton: 'short', type: 'date' });
12000
12010
  let value = null;
12001
- if (typeof val === 'string') {
12011
+ if (typeof val === 'string' && !(this.enableMask && this.maskedDateValue &&
12012
+ this.inputElement.value === this.maskedDateValue && !this.value)) {
12002
12013
  if (val.toUpperCase().indexOf('AM') > -1 || val.toUpperCase().indexOf('PM') > -1) {
12003
12014
  today = this.defaultCulture.formatDate(new Date(), { format: formatStr, skeleton: 'short', type: 'date' });
12004
12015
  value = isNaN(+new Date(today + ' ' + val)) ? null : new Date(new Date(today + ' ' + val).setMilliseconds(0));