@syncfusion/ej2-calendars 23.1.36 → 23.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.
@@ -857,6 +857,7 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
857
857
  var dayLink = this.createElement('span');
858
858
  var localMonth = (value && (value).getMonth() === localDate.getMonth());
859
859
  var select$$1 = (value && (value).getFullYear() === yr && localMonth);
860
+ var title = this.globalize.formatDate(localDate, { type: 'date', format: 'MMM y' });
860
861
  dayLink.textContent = this.toCapitalize(this.globalize.formatDate(localDate, {
861
862
  format: null, type: 'dateTime', skeleton: 'MMM'
862
863
  }));
@@ -875,6 +876,7 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
875
876
  localDate.setMonth(localDate.getMonth() + 1);
876
877
  if (!tdEle.classList.contains(DISABLED)) {
877
878
  EventHandler.add(tdEle, 'click', this.clickHandler, this);
879
+ dayLink.setAttribute('title', '' + title);
878
880
  }
879
881
  tdEle.appendChild(dayLink);
880
882
  tdEles.push(tdEle);
@@ -933,6 +935,7 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
933
935
  }
934
936
  if (!tdEle.classList.contains(DISABLED)) {
935
937
  EventHandler.add(tdEle, 'click', this.clickHandler, this);
938
+ dayLink.setAttribute('title', '' + dayLink.textContent);
936
939
  }
937
940
  tdEle.appendChild(dayLink);
938
941
  tdEles.push(tdEle);
@@ -2289,7 +2292,7 @@ var Calendar = /** @__PURE__ @class */ (function (_super) {
2289
2292
  this.islamicModule.islamicRenderTemplate(elements, count, classNm, e, this.value);
2290
2293
  }
2291
2294
  this.changedArgs = { value: this.value, values: this.values };
2292
- this.changeHandler();
2295
+ e && e.type === 'click' && e.currentTarget.classList.contains(OTHERMONTH) ? this.changeHandler(e) : this.changeHandler();
2293
2296
  };
2294
2297
  Calendar.prototype.clickHandler = function (e) {
2295
2298
  var eve = e.currentTarget;
@@ -3337,7 +3340,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3337
3340
  var ariaAttrs = {
3338
3341
  'aria-atomic': 'true', 'aria-expanded': 'false',
3339
3342
  'role': 'combobox', 'autocomplete': 'off', 'autocorrect': 'off',
3340
- 'autocapitalize': 'off', 'spellcheck': 'false', 'aria-invalid': 'false'
3343
+ 'autocapitalize': 'off', 'spellcheck': 'false', 'aria-invalid': 'false', 'aria-label': this.getModuleName()
3341
3344
  };
3342
3345
  if (this.getModuleName() === 'datepicker') {
3343
3346
  var l10nLocale = { placeholder: this.placeholder };
@@ -4087,10 +4090,10 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4087
4090
  }
4088
4091
  else {
4089
4092
  if (this.calendarMode === 'Gregorian') {
4090
- formatOptions = { type: 'dateTime', skeleton: 'yMd' };
4093
+ formatOptions = { format: format, type: 'dateTime', skeleton: 'yMd' };
4091
4094
  }
4092
4095
  else {
4093
- formatOptions = { type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
4096
+ formatOptions = { format: format, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
4094
4097
  }
4095
4098
  date = this.globalize.parseDate(this.inputElement.value, formatOptions);
4096
4099
  }
@@ -4154,7 +4157,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4154
4157
  targetType: 'container',
4155
4158
  enableRtl: this.enableRtl,
4156
4159
  zIndex: this.zIndex,
4157
- collision: Browser.isDevice ? { X: 'fit', Y: 'fit' } : { X: 'flip', Y: 'flip' },
4160
+ collision: Browser.isDevice ? { X: 'fit', Y: 'fit' } : (this.enableRtl ? { X: 'fit', Y: 'flip' } : { X: 'flip', Y: 'flip' }),
4158
4161
  open: function () {
4159
4162
  if (Browser.isDevice && _this.fullScreenMode) {
4160
4163
  _this.iconRight = parseInt(window.getComputedStyle(_this.calendarElement.querySelector('.e-header.e-month .e-prev')).marginRight, 10) > 16 ? true : false;
@@ -4636,7 +4639,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4636
4639
  var ariaAttrs = {
4637
4640
  'aria-atomic': 'true', 'aria-disabled': 'true',
4638
4641
  'aria-expanded': 'false', 'role': 'combobox', 'autocomplete': 'off',
4639
- 'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false'
4642
+ 'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false', 'aria-label': this.getModuleName()
4640
4643
  };
4641
4644
  if (this.inputElement) {
4642
4645
  Input.removeAttributes(ariaAttrs, this.inputElement);
@@ -12633,6 +12636,12 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
12633
12636
  this.cloneElement = this.element.cloneNode(true);
12634
12637
  this.dateTimeFormat = this.cldrDateTimeFormat();
12635
12638
  this.initValue = this.value;
12639
+ if (typeof (this.min) === 'string') {
12640
+ this.min = this.checkDateValue(new Date(this.min));
12641
+ }
12642
+ if (typeof (this.max) === 'string') {
12643
+ this.max = this.checkDateValue(new Date(this.max));
12644
+ }
12636
12645
  if (!isNullOrUndefined(closest(this.element, 'fieldset')) && closest(this.element, 'fieldset').disabled) {
12637
12646
  this.enabled = false;
12638
12647
  }