@syncfusion/ej2-calendars 25.1.37 → 25.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.
@@ -300,8 +300,8 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
300
300
  }
301
301
  };
302
302
  CalendarBase.prototype.removeContentFocus = function (args) {
303
- var focusedDate = this.tableBodyElement.querySelector('tr td.e-focused-date');
304
- var selectedDate = this.tableBodyElement.querySelector('tr td.e-selected');
303
+ var focusedDate = !isNullOrUndefined(this.tableBodyElement) ? this.tableBodyElement.querySelector('tr td.e-focused-date') : null;
304
+ var selectedDate = !isNullOrUndefined(this.tableBodyElement) ? this.tableBodyElement.querySelector('tr td.e-selected') : null;
305
305
  if (!isNullOrUndefined(selectedDate)) {
306
306
  selectedDate.classList.remove(FOCUSEDCELL);
307
307
  }
@@ -3337,7 +3337,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3337
3337
  DatePicker.prototype.render = function () {
3338
3338
  this.initialize();
3339
3339
  this.bindEvents();
3340
- if (this.floatLabelType === 'Auto') {
3340
+ if (this.floatLabelType !== 'Never') {
3341
3341
  Input.calculateWidth(this.inputElement, this.inputWrapper.container);
3342
3342
  }
3343
3343
  if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
@@ -5505,7 +5505,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
5505
5505
  if (this.element.hasAttribute('data-val')) {
5506
5506
  this.element.setAttribute('data-val', 'false');
5507
5507
  }
5508
- if (this.floatLabelType === 'Auto') {
5508
+ if (this.floatLabelType !== 'Never') {
5509
5509
  Input.calculateWidth(this.inputElement, this.inputWrapper.container);
5510
5510
  }
5511
5511
  if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
@@ -12817,7 +12817,7 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
12817
12817
  this.inputElement.tabIndex = -1;
12818
12818
  }
12819
12819
  }
12820
- if (this.floatLabelType === 'Auto') {
12820
+ if (this.floatLabelType !== 'Never') {
12821
12821
  Input.calculateWidth(this.inputElement, this.inputWrapper.container);
12822
12822
  }
12823
12823
  if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
@@ -13088,6 +13088,9 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
13088
13088
  var dateObject;
13089
13089
  if (this.calendarMode === 'Gregorian') {
13090
13090
  this.cldrDateTimeFormat().replace(this.formatRegex, this.TimePopupFormat());
13091
+ if (this.dateFormatString === '') {
13092
+ this.dateFormatString = this.cldrDateTimeFormat();
13093
+ }
13091
13094
  dateObject = this.globalize.parseDate(this.inputElement.value, {
13092
13095
  format: this.dateFormatString, type: 'datetime'
13093
13096
  });
@@ -14324,7 +14327,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14324
14327
  this.isNavigate = false;
14325
14328
  this.navigated = false;
14326
14329
  this.isBlur = false;
14327
- this.formatRegex = /EEEEE|EEEE|EEE|EE|E|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|HH|H|hh|h|mm|m|fff|ff|f|aa|a|ss|s|zzzz|zzz|zz|z|'[^']*'|'[^']*'/g;
14330
+ this.formatRegex = /EEEEE|EEEE|EEE|EE|E|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yyy|yy|y|HH|H|hh|h|mm|m|fff|ff|f|aa|a|ss|s|zzzz|zzz|zz|z|'[^']*'|'[^']*'/g;
14328
14331
  this.isDeletion = false;
14329
14332
  this.isShortYear = false;
14330
14333
  this.isDeleteKey = false;
@@ -14635,6 +14638,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14635
14638
  var year = (this.isYearPart && (newDateValue.getFullYear().toString().length < 4
14636
14639
  && !this.isShortYear) ? newDateValue.getFullYear() * 10 : 0) + parseInt(newVal[start - 1], 10);
14637
14640
  var yearValue = (this.dateformat.match(/y/g) || []).length;
14641
+ yearValue = yearValue !== 2 ? 4 : yearValue;
14638
14642
  this.isShortYear = false;
14639
14643
  this.isYearZero = (newVal[start - 1] === '0');
14640
14644
  if (isNaN(year)) {
@@ -14825,6 +14829,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14825
14829
  result = proxy.zeroCheck(proxy.isYearZero, proxy.isYearPart, result);
14826
14830
  break;
14827
14831
  case 'y':
14832
+ case 'yyy':
14828
14833
  case 'yyyy':
14829
14834
  result = proxy.isYearPart ? proxy.roundOff(proxy.maskDateValue.getFullYear(), 4) : proxy.defaultConstant['year'].toString();
14830
14835
  result = proxy.zeroCheck(proxy.isYearZero, proxy.isYearPart, result);