@syncfusion/ej2-calendars 21.2.4 → 21.2.6

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.
@@ -2899,6 +2899,10 @@ var Islamic = /** @__PURE__ @class */ (function () {
2899
2899
  var endFullYr = endYr.getFullYear();
2900
2900
  var startHdrYr = this.calendarInstance.globalize.formatDate(startYr, { type: 'dateTime', format: 'y', calendar: 'islamic' });
2901
2901
  var endHdrYr = this.calendarInstance.globalize.formatDate(endYr, { type: 'dateTime', format: 'y', calendar: 'islamic' });
2902
+ if (this.calendarInstance.locale === 'ar') {
2903
+ startHdrYr = Number(startHdrYr.replace(/[٠١٢٣٤٥٦٧٨٩]/g, function (d) { return String.fromCharCode(d.charCodeAt(0) - 1632 + 48); }));
2904
+ endHdrYr = Number(endHdrYr.replace(/[٠١٢٣٤٥٦٧٨٩]/g, function (d) { return String.fromCharCode(d.charCodeAt(0) - 1632 + 48); }));
2905
+ }
2902
2906
  var splityear = this.calendarInstance.headerElement.textContent.split('-');
2903
2907
  if ((!isNullOrUndefined(e) && (splityear[0] !== startHdrYr) && e.action === 'home') || (!isNullOrUndefined(e) && e.type === 'keydown' && e.action === 'end')) {
2904
2908
  startHdrYr = this.calendarInstance.headerElement.textContent.split('-')[0].trim();
@@ -2960,7 +2964,14 @@ var Islamic = /** @__PURE__ @class */ (function () {
2960
2964
  ? (parseInt(endHdrYr, 10) + 2).toString() : endHdrYr - startHdrYr === 8
2961
2965
  ? (parseInt(endHdrYr, 10) + 1).toString() : endHdrYr;
2962
2966
  }
2963
- this.calendarInstance.headerTitleElement.textContent = startHdrYr + ' - ' + (endHdrYr);
2967
+ if (this.calendarInstance.locale === 'ar') {
2968
+ var startHeaderYear = this.calendarInstance.globalize.formatDate(startYr, { type: 'dateTime', format: 'y', calendar: 'islamic' });
2969
+ var endHeaderYear = this.calendarInstance.globalize.formatDate(endYr, { type: 'dateTime', format: 'y', calendar: 'islamic' });
2970
+ this.calendarInstance.headerTitleElement.textContent = startHeaderYear + ' - ' + (endHeaderYear);
2971
+ }
2972
+ else {
2973
+ this.calendarInstance.headerTitleElement.textContent = startHdrYr + ' - ' + (endHdrYr);
2974
+ }
2964
2975
  this.calendarInstance.nextIconClicked = this.calendarInstance.previousIconClicked = false;
2965
2976
  var year = (parseInt(startHdrYr, 10) - 2).toString();
2966
2977
  startFullYr = Math.round(parseInt(startHdrYr, 10) * 0.97 + 622);
@@ -10183,7 +10194,6 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
10183
10194
  this.generateList();
10184
10195
  append([this.listWrapper], this.popupWrapper);
10185
10196
  }
10186
- this.openPopupEventArgs.appendTo.appendChild(this.popupWrapper);
10187
10197
  this.addSelection();
10188
10198
  this.renderPopup();
10189
10199
  detach(this.popupWrapper);
@@ -12009,7 +12019,7 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
12009
12019
  this.invalidValueString = null;
12010
12020
  this.checkInvalidValue(newProp.value);
12011
12021
  newProp.value = this.value;
12012
- if (!this.invalidValueString && !this.enableMask) {
12022
+ if (!this.invalidValueString) {
12013
12023
  if (typeof newProp.value === 'string') {
12014
12024
  this.setProperties({ value: this.checkDateValue(new Date(newProp.value)) }, true);
12015
12025
  newProp.value = this.value;
@@ -12022,14 +12032,14 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
12022
12032
  this.initValue = newProp.value;
12023
12033
  newProp.value = this.compareFormatChange(this.checkValue(newProp.value));
12024
12034
  }
12025
- else if (this.enableMask) {
12026
- this.updateInputValue(this.maskedDateValue);
12027
- this.checkErrorState(this.maskedDateValue);
12028
- }
12029
12035
  else {
12030
12036
  this.updateInputValue(this.invalidValueString);
12031
12037
  this.checkErrorState(this.invalidValueString);
12032
12038
  }
12039
+ if (this.enableMask && isNullOrUndefined(newProp.value)) {
12040
+ this.updateInputValue(this.maskedDateValue);
12041
+ this.checkErrorState(this.maskedDateValue);
12042
+ }
12033
12043
  this.checkValueChange(null, false);
12034
12044
  if (this.isPopupOpen()) {
12035
12045
  this.setScrollPosition();