@syncfusion/ej2-calendars 28.2.9 → 29.1.33

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.
Files changed (137) hide show
  1. package/README.md +1 -1
  2. package/dist/ej2-calendars.min.js +2 -2
  3. package/dist/ej2-calendars.umd.min.js +2 -2
  4. package/dist/ej2-calendars.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-calendars.es2015.js +99 -8
  6. package/dist/es6/ej2-calendars.es2015.js.map +1 -1
  7. package/dist/es6/ej2-calendars.es5.js +102 -8
  8. package/dist/es6/ej2-calendars.es5.js.map +1 -1
  9. package/dist/global/ej2-calendars.min.js +2 -2
  10. package/dist/global/ej2-calendars.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +11 -11
  13. package/src/datepicker/datepicker-model.d.ts +8 -0
  14. package/src/datepicker/datepicker.d.ts +17 -2
  15. package/src/datepicker/datepicker.js +84 -1
  16. package/src/daterangepicker/daterangepicker.js +1 -1
  17. package/src/datetimepicker/datetimepicker.js +4 -2
  18. package/src/maskbase/interface.d.ts +1 -0
  19. package/src/maskbase/masked-date-time.js +8 -1
  20. package/src/timepicker/timepicker.js +5 -3
  21. package/styles/bds-lite.css +6 -6
  22. package/styles/bds.css +6 -6
  23. package/styles/bootstrap-dark-lite.css +11 -11
  24. package/styles/bootstrap-dark.css +16 -16
  25. package/styles/bootstrap-lite.css +11 -11
  26. package/styles/bootstrap.css +16 -16
  27. package/styles/bootstrap4-lite.css +31 -31
  28. package/styles/bootstrap4.css +45 -45
  29. package/styles/bootstrap5-dark-lite.css +67 -67
  30. package/styles/bootstrap5-dark.css +102 -102
  31. package/styles/bootstrap5-lite.css +26 -26
  32. package/styles/bootstrap5.3-lite.css +6 -6
  33. package/styles/bootstrap5.3.css +6 -6
  34. package/styles/bootstrap5.css +31 -31
  35. package/styles/calendar/_bigger.scss +3 -0
  36. package/styles/calendar/_bootstrap-dark-definition.scss +4 -2
  37. package/styles/calendar/_bootstrap-definition.scss +4 -2
  38. package/styles/calendar/_bootstrap4-definition.scss +12 -10
  39. package/styles/calendar/_bootstrap5-definition.scss +4 -2
  40. package/styles/calendar/_fabric-definition.scss +3 -1
  41. package/styles/calendar/_fluent2-definition.scss +1 -0
  42. package/styles/calendar/_fusionnew-definition.scss +4 -2
  43. package/styles/calendar/_highcontrast-definition.scss +3 -1
  44. package/styles/calendar/_material-definition.scss +3 -1
  45. package/styles/calendar/_tailwind-definition.scss +4 -2
  46. package/styles/calendar/_theme.scss +1 -1
  47. package/styles/calendar/bootstrap-dark.css +4 -4
  48. package/styles/calendar/bootstrap.css +4 -4
  49. package/styles/calendar/bootstrap4.css +24 -24
  50. package/styles/calendar/bootstrap5-dark.css +53 -53
  51. package/styles/calendar/bootstrap5.css +14 -14
  52. package/styles/calendar/fabric-dark.css +12 -12
  53. package/styles/calendar/fabric.css +4 -4
  54. package/styles/calendar/fluent-dark.css +2 -2
  55. package/styles/calendar/fluent.css +2 -2
  56. package/styles/calendar/fluent2.css +1 -0
  57. package/styles/calendar/highcontrast.css +2 -2
  58. package/styles/calendar/material.css +2 -2
  59. package/styles/calendar/tailwind-dark.css +17 -17
  60. package/styles/calendar/tailwind.css +4 -4
  61. package/styles/calendar/tailwind3.css +2 -2
  62. package/styles/datepicker/_bootstrap4-definition.scss +4 -2
  63. package/styles/datepicker/_layout.scss +3 -1
  64. package/styles/datepicker/bootstrap4.css +2 -2
  65. package/styles/datepicker/bootstrap5-dark.css +4 -4
  66. package/styles/datepicker/bootstrap5.css +1 -1
  67. package/styles/datepicker/fluent2.css +3 -1
  68. package/styles/daterangepicker/_bootstrap-dark-definition.scss +4 -2
  69. package/styles/daterangepicker/_bootstrap-definition.scss +4 -2
  70. package/styles/daterangepicker/_bootstrap4-definition.scss +6 -4
  71. package/styles/daterangepicker/_fabric-dark-definition.scss +3 -1
  72. package/styles/daterangepicker/_fabric-definition.scss +3 -1
  73. package/styles/daterangepicker/_fusionnew-definition.scss +1 -1
  74. package/styles/daterangepicker/_highcontrast-definition.scss +6 -4
  75. package/styles/daterangepicker/_highcontrast-light-definition.scss +5 -3
  76. package/styles/daterangepicker/_layout.scss +14 -10
  77. package/styles/daterangepicker/_material-dark-definition.scss +3 -1
  78. package/styles/daterangepicker/_material-definition.scss +3 -1
  79. package/styles/daterangepicker/bds.css +6 -6
  80. package/styles/daterangepicker/bootstrap-dark.css +12 -12
  81. package/styles/daterangepicker/bootstrap.css +12 -12
  82. package/styles/daterangepicker/bootstrap4.css +12 -12
  83. package/styles/daterangepicker/bootstrap5-dark.css +36 -36
  84. package/styles/daterangepicker/bootstrap5.3.css +6 -6
  85. package/styles/daterangepicker/bootstrap5.css +14 -14
  86. package/styles/daterangepicker/fabric-dark.css +12 -12
  87. package/styles/daterangepicker/fabric.css +8 -8
  88. package/styles/daterangepicker/fluent-dark.css +10 -10
  89. package/styles/daterangepicker/fluent.css +10 -10
  90. package/styles/daterangepicker/fluent2.css +6 -6
  91. package/styles/daterangepicker/highcontrast-light.css +14 -14
  92. package/styles/daterangepicker/highcontrast.css +16 -16
  93. package/styles/daterangepicker/material-dark.css +8 -8
  94. package/styles/daterangepicker/material.css +8 -8
  95. package/styles/daterangepicker/material3-dark.css +6 -6
  96. package/styles/daterangepicker/material3.css +6 -6
  97. package/styles/daterangepicker/tailwind-dark.css +23 -23
  98. package/styles/daterangepicker/tailwind.css +6 -6
  99. package/styles/daterangepicker/tailwind3.css +6 -6
  100. package/styles/datetimepicker/_bootstrap4-definition.scss +5 -3
  101. package/styles/datetimepicker/bootstrap4.css +3 -3
  102. package/styles/datetimepicker/bootstrap5-dark.css +3 -3
  103. package/styles/fabric-dark-lite.css +15 -15
  104. package/styles/fabric-dark.css +24 -24
  105. package/styles/fabric-lite.css +9 -9
  106. package/styles/fabric.css +12 -12
  107. package/styles/fluent-dark-lite.css +12 -12
  108. package/styles/fluent-dark.css +12 -12
  109. package/styles/fluent-lite.css +12 -12
  110. package/styles/fluent.css +12 -12
  111. package/styles/fluent2-lite.css +9 -7
  112. package/styles/fluent2.css +10 -7
  113. package/styles/highcontrast-light-lite.css +10 -10
  114. package/styles/highcontrast-light.css +14 -14
  115. package/styles/highcontrast-lite.css +12 -12
  116. package/styles/highcontrast.css +18 -18
  117. package/styles/material-dark-lite.css +7 -7
  118. package/styles/material-dark.css +8 -8
  119. package/styles/material-lite.css +8 -8
  120. package/styles/material.css +10 -10
  121. package/styles/material3-dark-lite.css +6 -6
  122. package/styles/material3-dark.css +6 -6
  123. package/styles/material3-lite.css +6 -6
  124. package/styles/material3.css +6 -6
  125. package/styles/tailwind-dark-lite.css +26 -26
  126. package/styles/tailwind-dark.css +41 -41
  127. package/styles/tailwind-lite.css +8 -8
  128. package/styles/tailwind.css +10 -10
  129. package/styles/tailwind3-lite.css +8 -8
  130. package/styles/tailwind3.css +8 -8
  131. package/styles/timepicker/_bootstrap4-definition.scss +6 -4
  132. package/styles/timepicker/_bootstrap5-definition.scss +3 -1
  133. package/styles/timepicker/_fluent-definition.scss +3 -1
  134. package/styles/timepicker/bootstrap4.css +4 -4
  135. package/styles/timepicker/bootstrap5-dark.css +6 -6
  136. package/styles/timepicker/bootstrap5.css +2 -2
  137. package/styles/timepicker/tailwind-dark.css +1 -1
@@ -4202,9 +4202,43 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4202
4202
  }
4203
4203
  date = this.globalize.parseDate(this.getAmPmValue(this.inputElement.value), formatOptions);
4204
4204
  }
4205
+ if ((isNullOrUndefined(date) || (typeof (date) === 'object' && isNaN(date.getTime())))
4206
+ && !isNullOrUndefined(this.inputFormatsString)) {
4207
+ for (var _i = 0, _a = this.inputFormatsString; _i < _a.length; _i++) {
4208
+ var format_1 = _a[_i];
4209
+ var inputFormatOptions = void 0;
4210
+ if (this.calendarMode === 'Gregorian') {
4211
+ inputFormatOptions = { format: format_1, type: 'dateTime', skeleton: 'yMd' };
4212
+ }
4213
+ else {
4214
+ inputFormatOptions = { format: format_1, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
4215
+ }
4216
+ date = this.globalize.parseDate(this.getAmPmValue(this.inputElement.value), inputFormatOptions);
4217
+ if (!isNullOrUndefined(date) && date instanceof Date && !isNaN(date.getTime())) {
4218
+ break;
4219
+ }
4220
+ }
4221
+ }
4205
4222
  }
4206
4223
  else {
4207
4224
  date = this.globalize.parseDate(this.getAmPmValue(this.inputElement.value), dateOptions);
4225
+ if ((isNullOrUndefined(date) || (typeof (date) === 'object' && isNaN(date.getTime())))
4226
+ && !isNullOrUndefined(this.inputFormatsString)) {
4227
+ for (var _b = 0, _c = this.inputFormatsString; _b < _c.length; _b++) {
4228
+ var format_2 = _c[_b];
4229
+ var inputFormatOptions = void 0;
4230
+ if (this.calendarMode === 'Gregorian') {
4231
+ inputFormatOptions = { format: format_2, type: 'dateTime', skeleton: 'yMd' };
4232
+ }
4233
+ else {
4234
+ inputFormatOptions = { format: format_2, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
4235
+ }
4236
+ date = this.globalize.parseDate(this.getAmPmValue(this.inputElement.value), inputFormatOptions);
4237
+ if (!isNullOrUndefined(date) && date instanceof Date && !isNaN(date.getTime())) {
4238
+ break;
4239
+ }
4240
+ }
4241
+ }
4208
4242
  date = (!isNullOrUndefined(date) && isNaN(+date)) ? null : date;
4209
4243
  if (!isNullOrUndefined(this.formatString) && this.inputElement.value !== '' && this.strictMode) {
4210
4244
  if ((this.isPopupClicked || (!this.isPopupClicked && this.inputElement.value === this.previousElementValue))
@@ -4444,7 +4478,8 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4444
4478
  }
4445
4479
  this.isKeyAction = false;
4446
4480
  };
4447
- DatePicker.prototype.navigatedEvent = function () {
4481
+ DatePicker.prototype.navigatedEvent = function (eve) {
4482
+ extend(this.navigatedArgs, { name: 'navigated', event: eve });
4448
4483
  this.trigger('navigated', this.navigatedArgs);
4449
4484
  };
4450
4485
  DatePicker.prototype.keyupHandler = function (e) {
@@ -4879,6 +4914,9 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4879
4914
  this.updateHtmlAttributeToElement();
4880
4915
  this.defaultKeyConfigs = this.getDefaultKeyConfig();
4881
4916
  this.checkHtmlAttributes(false);
4917
+ if (this.inputFormats) {
4918
+ this.checkInputFormats();
4919
+ }
4882
4920
  this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
4883
4921
  this.element.removeAttribute('tabindex');
4884
4922
  _super.prototype.preRender.call(this);
@@ -4951,6 +4989,37 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4951
4989
  this.formatString = null;
4952
4990
  }
4953
4991
  };
4992
+ DatePicker.prototype.checkInputFormats = function () {
4993
+ var culture = new Internationalization(this.locale);
4994
+ this.inputFormatsString = [];
4995
+ if (this.inputFormats) {
4996
+ for (var _i = 0, _a = this.inputFormats; _i < _a.length; _i++) {
4997
+ var format = _a[_i];
4998
+ var formatString = '';
4999
+ if (typeof format === 'string') {
5000
+ formatString = format;
5001
+ }
5002
+ else if (format.skeleton !== '' && !isNullOrUndefined(format.skeleton)) {
5003
+ var skeletonString = format.skeleton;
5004
+ if (this.getModuleName() === 'datetimepicker') {
5005
+ formatString = culture.getDatePattern({ skeleton: skeletonString, type: 'dateTime' });
5006
+ }
5007
+ else {
5008
+ formatString = culture.getDatePattern({ skeleton: skeletonString, type: 'date' });
5009
+ }
5010
+ }
5011
+ if (formatString) {
5012
+ this.inputFormatsString.push(formatString);
5013
+ }
5014
+ }
5015
+ if (this.inputFormatsString.length === 0) {
5016
+ this.inputFormatsString = null;
5017
+ }
5018
+ }
5019
+ else {
5020
+ this.inputFormatsString = null;
5021
+ }
5022
+ };
4954
5023
  DatePicker.prototype.checkHtmlAttributes = function (dynamic) {
4955
5024
  this.globalize = new Internationalization(this.locale);
4956
5025
  this.checkFormat();
@@ -5203,6 +5272,9 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
5203
5272
  }
5204
5273
  }
5205
5274
  break;
5275
+ case 'inputFormats':
5276
+ this.checkInputFormats();
5277
+ break;
5206
5278
  case 'allowEdit':
5207
5279
  this.setAllowEdit();
5208
5280
  break;
@@ -5307,6 +5379,14 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
5307
5379
  this.isDynamicValueChanged = false;
5308
5380
  }
5309
5381
  };
5382
+ /**
5383
+ * @private
5384
+ * @param {Date | Date[]} dates - Specifies the date or dates to be added to the values property of the Calendar.
5385
+ * @returns {void}
5386
+ */
5387
+ DatePicker.prototype.addDate = function (dates) {
5388
+ // no code
5389
+ };
5310
5390
  __decorate$1([
5311
5391
  Property(null)
5312
5392
  ], DatePicker.prototype, "width", void 0);
@@ -5322,6 +5402,9 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
5322
5402
  __decorate$1([
5323
5403
  Property(null)
5324
5404
  ], DatePicker.prototype, "format", void 0);
5405
+ __decorate$1([
5406
+ Property(null)
5407
+ ], DatePicker.prototype, "inputFormats", void 0);
5325
5408
  __decorate$1([
5326
5409
  Property(true)
5327
5410
  ], DatePicker.prototype, "enabled", void 0);
@@ -6449,7 +6532,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6449
6532
  this.updateHiddenInput();
6450
6533
  };
6451
6534
  DateRangePicker.prototype.getStartEndDate = function (date, isEnd) {
6452
- if (this.currentView() === 'Year' && !isNullOrUndefined(date)) {
6535
+ if ((this.currentView() === 'Year' && !isNullOrUndefined(date)) || this.depth === 'Year') {
6453
6536
  return new Date(date.getFullYear(), date.getMonth() + (isEnd ? 1 : 0), isEnd ? 0 : 1);
6454
6537
  }
6455
6538
  else if (this.currentView() === 'Decade' && !isNullOrUndefined(date)) {
@@ -10632,8 +10715,9 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
10632
10715
  TimePicker.prototype.popupCreation = function () {
10633
10716
  this.popupWrapper = this.createElement('div', {
10634
10717
  className: ROOT$3 + ' ' + POPUP$2,
10635
- attrs: { 'id': this.element.id + '_popup', 'style': 'visibility:hidden' }
10718
+ attrs: { 'id': this.element.id + '_popup' }
10636
10719
  });
10720
+ this.popupWrapper.style.visibility = 'hidden';
10637
10721
  this.popupWrapper.setAttribute('aria-label', this.element.id);
10638
10722
  this.popupWrapper.setAttribute('role', 'dialog');
10639
10723
  if (!isNullOrUndefined(this.cssClass)) {
@@ -11244,8 +11328,9 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
11244
11328
  }
11245
11329
  else {
11246
11330
  if (!isNavigation) {
11247
- if ((this.prevValue !== this.inputElement.value) || isNullOrUndefined(this.checkDateValue(this.value))) {
11248
- this.valueProcess(event, this.compareFormatChange(this.inputElement.value));
11331
+ var value = this.compareFormatChange(this.inputElement.value);
11332
+ if ((+this.prevDate !== +value) || isNullOrUndefined(this.checkDateValue(this.value))) {
11333
+ this.valueProcess(event, value);
11249
11334
  }
11250
11335
  }
11251
11336
  else {
@@ -13304,10 +13389,12 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
13304
13389
  }
13305
13390
  else {
13306
13391
  if (!this.readonly) {
13307
- this.dateTimeWrapper = createElement('div', {
13392
+ var dateTimeWrapperElement = createElement('div', {
13308
13393
  className: ROOT$4 + ' ' + POPUP$3,
13309
- attrs: { 'id': this.element.id + '_timepopup', 'style': 'visibility:hidden ; display:block' }
13394
+ attrs: { 'id': this.element.id + '_timepopup' }
13310
13395
  });
13396
+ dateTimeWrapperElement.style.cssText = 'visibility: hidden; display: block;';
13397
+ this.dateTimeWrapper = dateTimeWrapperElement;
13311
13398
  if (!isNullOrUndefined(this.cssClass)) {
13312
13399
  this.dateTimeWrapper.className += ' ' + this.cssClass;
13313
13400
  }
@@ -14548,7 +14635,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14548
14635
  this.isNavigate = false;
14549
14636
  this.navigated = false;
14550
14637
  this.isBlur = false;
14551
- 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;
14638
+ this.formatRegex = /EEEEE|EEEE|EEE|EE|E|cccc|ccc|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;
14552
14639
  this.isDeletion = false;
14553
14640
  this.isShortYear = false;
14554
14641
  this.isDeleteKey = false;
@@ -15044,9 +15131,11 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
15044
15131
  case 'E':
15045
15132
  case 'EE':
15046
15133
  case 'EEE':
15134
+ case 'ccc':
15047
15135
  result = proxy.isDayPart && proxy.isMonthPart && proxy.isYearPart ? daysAbbreviated[dayKeyAbbreviated[proxy.maskDateValue.getDay()]].toString() : proxy.defaultConstant['dayOfTheWeek'].toString();
15048
15136
  break;
15049
15137
  case 'EEEE':
15138
+ case 'cccc':
15050
15139
  result = proxy.isDayPart && proxy.isMonthPart && proxy.isYearPart ? daysWide[dayKeyWide[proxy.maskDateValue.getDay()]].toString() : proxy.defaultConstant['dayOfTheWeek'].toString();
15051
15140
  break;
15052
15141
  case 'EEEEE':
@@ -15424,6 +15513,11 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
15424
15513
  this.previousHiddenMask = this.hiddenMask;
15425
15514
  this.previousValue = inputValue;
15426
15515
  this.parent.updateInputValue(inputValue);
15516
+ if (this.parent.strictMode && (this.dayTypeCount !== 0 || this.monthTypeCount !== 0)) {
15517
+ this.isLeadingZero = false;
15518
+ }
15519
+ this.dayTypeCount = 0;
15520
+ this.monthTypeCount = 0;
15427
15521
  };
15428
15522
  MaskedDateTime.prototype.destroy = function () {
15429
15523
  this.removeEventListener();