@syncfusion/ej2-calendars 25.1.37 → 25.1.39

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.
@@ -3297,7 +3297,7 @@ let DatePicker = class DatePicker extends Calendar {
3297
3297
  render() {
3298
3298
  this.initialize();
3299
3299
  this.bindEvents();
3300
- if (this.floatLabelType === 'Auto') {
3300
+ if (this.floatLabelType !== 'Never') {
3301
3301
  Input.calculateWidth(this.inputElement, this.inputWrapper.container);
3302
3302
  }
3303
3303
  if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
@@ -5433,7 +5433,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
5433
5433
  if (this.element.hasAttribute('data-val')) {
5434
5434
  this.element.setAttribute('data-val', 'false');
5435
5435
  }
5436
- if (this.floatLabelType === 'Auto') {
5436
+ if (this.floatLabelType !== 'Never') {
5437
5437
  Input.calculateWidth(this.inputElement, this.inputWrapper.container);
5438
5438
  }
5439
5439
  if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
@@ -12675,7 +12675,7 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
12675
12675
  this.inputElement.tabIndex = -1;
12676
12676
  }
12677
12677
  }
12678
- if (this.floatLabelType === 'Auto') {
12678
+ if (this.floatLabelType !== 'Never') {
12679
12679
  Input.calculateWidth(this.inputElement, this.inputWrapper.container);
12680
12680
  }
12681
12681
  if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
@@ -12945,6 +12945,9 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
12945
12945
  let dateObject;
12946
12946
  if (this.calendarMode === 'Gregorian') {
12947
12947
  this.cldrDateTimeFormat().replace(this.formatRegex, this.TimePopupFormat());
12948
+ if (this.dateFormatString === '') {
12949
+ this.dateFormatString = this.cldrDateTimeFormat();
12950
+ }
12948
12951
  dateObject = this.globalize.parseDate(this.inputElement.value, {
12949
12952
  format: this.dateFormatString, type: 'datetime'
12950
12953
  });
@@ -14175,7 +14178,7 @@ class MaskedDateTime {
14175
14178
  this.isNavigate = false;
14176
14179
  this.navigated = false;
14177
14180
  this.isBlur = false;
14178
- 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;
14181
+ 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;
14179
14182
  this.isDeletion = false;
14180
14183
  this.isShortYear = false;
14181
14184
  this.isDeleteKey = false;
@@ -14485,6 +14488,7 @@ class MaskedDateTime {
14485
14488
  let year = (this.isYearPart && (newDateValue.getFullYear().toString().length < 4
14486
14489
  && !this.isShortYear) ? newDateValue.getFullYear() * 10 : 0) + parseInt(newVal[start - 1], 10);
14487
14490
  let yearValue = (this.dateformat.match(/y/g) || []).length;
14491
+ yearValue = yearValue !== 2 ? 4 : yearValue;
14488
14492
  this.isShortYear = false;
14489
14493
  this.isYearZero = (newVal[start - 1] === '0');
14490
14494
  if (isNaN(year)) {
@@ -14675,6 +14679,7 @@ class MaskedDateTime {
14675
14679
  result = proxy.zeroCheck(proxy.isYearZero, proxy.isYearPart, result);
14676
14680
  break;
14677
14681
  case 'y':
14682
+ case 'yyy':
14678
14683
  case 'yyyy':
14679
14684
  result = proxy.isYearPart ? proxy.roundOff(proxy.maskDateValue.getFullYear(), 4) : proxy.defaultConstant['year'].toString();
14680
14685
  result = proxy.zeroCheck(proxy.isYearZero, proxy.isYearPart, result);