@syncfusion/ej2-calendars 28.2.11 → 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 (136) 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 +92 -4
  6. package/dist/es6/ej2-calendars.es2015.js.map +1 -1
  7. package/dist/es6/ej2-calendars.es5.js +95 -4
  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/datetimepicker/datetimepicker.js +4 -2
  17. package/src/maskbase/interface.d.ts +1 -0
  18. package/src/maskbase/masked-date-time.js +5 -0
  19. package/src/timepicker/timepicker.js +2 -1
  20. package/styles/bds-lite.css +6 -6
  21. package/styles/bds.css +6 -6
  22. package/styles/bootstrap-dark-lite.css +11 -11
  23. package/styles/bootstrap-dark.css +16 -16
  24. package/styles/bootstrap-lite.css +11 -11
  25. package/styles/bootstrap.css +16 -16
  26. package/styles/bootstrap4-lite.css +31 -31
  27. package/styles/bootstrap4.css +45 -45
  28. package/styles/bootstrap5-dark-lite.css +67 -67
  29. package/styles/bootstrap5-dark.css +102 -102
  30. package/styles/bootstrap5-lite.css +26 -26
  31. package/styles/bootstrap5.3-lite.css +6 -6
  32. package/styles/bootstrap5.3.css +6 -6
  33. package/styles/bootstrap5.css +31 -31
  34. package/styles/calendar/_bigger.scss +3 -0
  35. package/styles/calendar/_bootstrap-dark-definition.scss +4 -2
  36. package/styles/calendar/_bootstrap-definition.scss +4 -2
  37. package/styles/calendar/_bootstrap4-definition.scss +12 -10
  38. package/styles/calendar/_bootstrap5-definition.scss +4 -2
  39. package/styles/calendar/_fabric-definition.scss +3 -1
  40. package/styles/calendar/_fluent2-definition.scss +1 -0
  41. package/styles/calendar/_fusionnew-definition.scss +4 -2
  42. package/styles/calendar/_highcontrast-definition.scss +3 -1
  43. package/styles/calendar/_material-definition.scss +3 -1
  44. package/styles/calendar/_tailwind-definition.scss +4 -2
  45. package/styles/calendar/_theme.scss +1 -1
  46. package/styles/calendar/bootstrap-dark.css +4 -4
  47. package/styles/calendar/bootstrap.css +4 -4
  48. package/styles/calendar/bootstrap4.css +24 -24
  49. package/styles/calendar/bootstrap5-dark.css +53 -53
  50. package/styles/calendar/bootstrap5.css +14 -14
  51. package/styles/calendar/fabric-dark.css +12 -12
  52. package/styles/calendar/fabric.css +4 -4
  53. package/styles/calendar/fluent-dark.css +2 -2
  54. package/styles/calendar/fluent.css +2 -2
  55. package/styles/calendar/fluent2.css +1 -0
  56. package/styles/calendar/highcontrast.css +2 -2
  57. package/styles/calendar/material.css +2 -2
  58. package/styles/calendar/tailwind-dark.css +17 -17
  59. package/styles/calendar/tailwind.css +4 -4
  60. package/styles/calendar/tailwind3.css +2 -2
  61. package/styles/datepicker/_bootstrap4-definition.scss +4 -2
  62. package/styles/datepicker/_layout.scss +3 -1
  63. package/styles/datepicker/bootstrap4.css +2 -2
  64. package/styles/datepicker/bootstrap5-dark.css +4 -4
  65. package/styles/datepicker/bootstrap5.css +1 -1
  66. package/styles/datepicker/fluent2.css +3 -1
  67. package/styles/daterangepicker/_bootstrap-dark-definition.scss +4 -2
  68. package/styles/daterangepicker/_bootstrap-definition.scss +4 -2
  69. package/styles/daterangepicker/_bootstrap4-definition.scss +6 -4
  70. package/styles/daterangepicker/_fabric-dark-definition.scss +3 -1
  71. package/styles/daterangepicker/_fabric-definition.scss +3 -1
  72. package/styles/daterangepicker/_fusionnew-definition.scss +1 -1
  73. package/styles/daterangepicker/_highcontrast-definition.scss +6 -4
  74. package/styles/daterangepicker/_highcontrast-light-definition.scss +5 -3
  75. package/styles/daterangepicker/_layout.scss +14 -10
  76. package/styles/daterangepicker/_material-dark-definition.scss +3 -1
  77. package/styles/daterangepicker/_material-definition.scss +3 -1
  78. package/styles/daterangepicker/bds.css +6 -6
  79. package/styles/daterangepicker/bootstrap-dark.css +12 -12
  80. package/styles/daterangepicker/bootstrap.css +12 -12
  81. package/styles/daterangepicker/bootstrap4.css +12 -12
  82. package/styles/daterangepicker/bootstrap5-dark.css +36 -36
  83. package/styles/daterangepicker/bootstrap5.3.css +6 -6
  84. package/styles/daterangepicker/bootstrap5.css +14 -14
  85. package/styles/daterangepicker/fabric-dark.css +12 -12
  86. package/styles/daterangepicker/fabric.css +8 -8
  87. package/styles/daterangepicker/fluent-dark.css +10 -10
  88. package/styles/daterangepicker/fluent.css +10 -10
  89. package/styles/daterangepicker/fluent2.css +6 -6
  90. package/styles/daterangepicker/highcontrast-light.css +14 -14
  91. package/styles/daterangepicker/highcontrast.css +16 -16
  92. package/styles/daterangepicker/material-dark.css +8 -8
  93. package/styles/daterangepicker/material.css +8 -8
  94. package/styles/daterangepicker/material3-dark.css +6 -6
  95. package/styles/daterangepicker/material3.css +6 -6
  96. package/styles/daterangepicker/tailwind-dark.css +23 -23
  97. package/styles/daterangepicker/tailwind.css +6 -6
  98. package/styles/daterangepicker/tailwind3.css +6 -6
  99. package/styles/datetimepicker/_bootstrap4-definition.scss +5 -3
  100. package/styles/datetimepicker/bootstrap4.css +3 -3
  101. package/styles/datetimepicker/bootstrap5-dark.css +3 -3
  102. package/styles/fabric-dark-lite.css +15 -15
  103. package/styles/fabric-dark.css +24 -24
  104. package/styles/fabric-lite.css +9 -9
  105. package/styles/fabric.css +12 -12
  106. package/styles/fluent-dark-lite.css +12 -12
  107. package/styles/fluent-dark.css +12 -12
  108. package/styles/fluent-lite.css +12 -12
  109. package/styles/fluent.css +12 -12
  110. package/styles/fluent2-lite.css +9 -7
  111. package/styles/fluent2.css +10 -7
  112. package/styles/highcontrast-light-lite.css +10 -10
  113. package/styles/highcontrast-light.css +14 -14
  114. package/styles/highcontrast-lite.css +12 -12
  115. package/styles/highcontrast.css +18 -18
  116. package/styles/material-dark-lite.css +7 -7
  117. package/styles/material-dark.css +8 -8
  118. package/styles/material-lite.css +8 -8
  119. package/styles/material.css +10 -10
  120. package/styles/material3-dark-lite.css +6 -6
  121. package/styles/material3-dark.css +6 -6
  122. package/styles/material3-lite.css +6 -6
  123. package/styles/material3.css +6 -6
  124. package/styles/tailwind-dark-lite.css +26 -26
  125. package/styles/tailwind-dark.css +41 -41
  126. package/styles/tailwind-lite.css +8 -8
  127. package/styles/tailwind.css +10 -10
  128. package/styles/tailwind3-lite.css +8 -8
  129. package/styles/tailwind3.css +8 -8
  130. package/styles/timepicker/_bootstrap4-definition.scss +6 -4
  131. package/styles/timepicker/_bootstrap5-definition.scss +3 -1
  132. package/styles/timepicker/_fluent-definition.scss +3 -1
  133. package/styles/timepicker/bootstrap4.css +4 -4
  134. package/styles/timepicker/bootstrap5-dark.css +6 -6
  135. package/styles/timepicker/bootstrap5.css +2 -2
  136. package/styles/timepicker/tailwind-dark.css +1 -1
@@ -4159,9 +4159,41 @@ let DatePicker = class DatePicker extends Calendar {
4159
4159
  }
4160
4160
  date = this.globalize.parseDate(this.getAmPmValue(this.inputElement.value), formatOptions);
4161
4161
  }
4162
+ if ((isNullOrUndefined(date) || (typeof (date) === 'object' && isNaN(date.getTime())))
4163
+ && !isNullOrUndefined(this.inputFormatsString)) {
4164
+ for (const format of this.inputFormatsString) {
4165
+ let inputFormatOptions;
4166
+ if (this.calendarMode === 'Gregorian') {
4167
+ inputFormatOptions = { format: format, type: 'dateTime', skeleton: 'yMd' };
4168
+ }
4169
+ else {
4170
+ inputFormatOptions = { format: format, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
4171
+ }
4172
+ date = this.globalize.parseDate(this.getAmPmValue(this.inputElement.value), inputFormatOptions);
4173
+ if (!isNullOrUndefined(date) && date instanceof Date && !isNaN(date.getTime())) {
4174
+ break;
4175
+ }
4176
+ }
4177
+ }
4162
4178
  }
4163
4179
  else {
4164
4180
  date = this.globalize.parseDate(this.getAmPmValue(this.inputElement.value), dateOptions);
4181
+ if ((isNullOrUndefined(date) || (typeof (date) === 'object' && isNaN(date.getTime())))
4182
+ && !isNullOrUndefined(this.inputFormatsString)) {
4183
+ for (const format of this.inputFormatsString) {
4184
+ let inputFormatOptions;
4185
+ if (this.calendarMode === 'Gregorian') {
4186
+ inputFormatOptions = { format: format, type: 'dateTime', skeleton: 'yMd' };
4187
+ }
4188
+ else {
4189
+ inputFormatOptions = { format: format, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
4190
+ }
4191
+ date = this.globalize.parseDate(this.getAmPmValue(this.inputElement.value), inputFormatOptions);
4192
+ if (!isNullOrUndefined(date) && date instanceof Date && !isNaN(date.getTime())) {
4193
+ break;
4194
+ }
4195
+ }
4196
+ }
4165
4197
  date = (!isNullOrUndefined(date) && isNaN(+date)) ? null : date;
4166
4198
  if (!isNullOrUndefined(this.formatString) && this.inputElement.value !== '' && this.strictMode) {
4167
4199
  if ((this.isPopupClicked || (!this.isPopupClicked && this.inputElement.value === this.previousElementValue))
@@ -4400,7 +4432,8 @@ let DatePicker = class DatePicker extends Calendar {
4400
4432
  }
4401
4433
  this.isKeyAction = false;
4402
4434
  }
4403
- navigatedEvent() {
4435
+ navigatedEvent(eve) {
4436
+ extend(this.navigatedArgs, { name: 'navigated', event: eve });
4404
4437
  this.trigger('navigated', this.navigatedArgs);
4405
4438
  }
4406
4439
  keyupHandler(e) {
@@ -4833,6 +4866,9 @@ let DatePicker = class DatePicker extends Calendar {
4833
4866
  this.updateHtmlAttributeToElement();
4834
4867
  this.defaultKeyConfigs = this.getDefaultKeyConfig();
4835
4868
  this.checkHtmlAttributes(false);
4869
+ if (this.inputFormats) {
4870
+ this.checkInputFormats();
4871
+ }
4836
4872
  this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
4837
4873
  this.element.removeAttribute('tabindex');
4838
4874
  super.preRender();
@@ -4905,6 +4941,36 @@ let DatePicker = class DatePicker extends Calendar {
4905
4941
  this.formatString = null;
4906
4942
  }
4907
4943
  }
4944
+ checkInputFormats() {
4945
+ const culture = new Internationalization(this.locale);
4946
+ this.inputFormatsString = [];
4947
+ if (this.inputFormats) {
4948
+ for (const format of this.inputFormats) {
4949
+ let formatString = '';
4950
+ if (typeof format === 'string') {
4951
+ formatString = format;
4952
+ }
4953
+ else if (format.skeleton !== '' && !isNullOrUndefined(format.skeleton)) {
4954
+ const skeletonString = format.skeleton;
4955
+ if (this.getModuleName() === 'datetimepicker') {
4956
+ formatString = culture.getDatePattern({ skeleton: skeletonString, type: 'dateTime' });
4957
+ }
4958
+ else {
4959
+ formatString = culture.getDatePattern({ skeleton: skeletonString, type: 'date' });
4960
+ }
4961
+ }
4962
+ if (formatString) {
4963
+ this.inputFormatsString.push(formatString);
4964
+ }
4965
+ }
4966
+ if (this.inputFormatsString.length === 0) {
4967
+ this.inputFormatsString = null;
4968
+ }
4969
+ }
4970
+ else {
4971
+ this.inputFormatsString = null;
4972
+ }
4973
+ }
4908
4974
  checkHtmlAttributes(dynamic) {
4909
4975
  this.globalize = new Internationalization(this.locale);
4910
4976
  this.checkFormat();
@@ -5153,6 +5219,9 @@ let DatePicker = class DatePicker extends Calendar {
5153
5219
  }
5154
5220
  }
5155
5221
  break;
5222
+ case 'inputFormats':
5223
+ this.checkInputFormats();
5224
+ break;
5156
5225
  case 'allowEdit':
5157
5226
  this.setAllowEdit();
5158
5227
  break;
@@ -5257,6 +5326,14 @@ let DatePicker = class DatePicker extends Calendar {
5257
5326
  this.isDynamicValueChanged = false;
5258
5327
  }
5259
5328
  }
5329
+ /**
5330
+ * @private
5331
+ * @param {Date | Date[]} dates - Specifies the date or dates to be added to the values property of the Calendar.
5332
+ * @returns {void}
5333
+ */
5334
+ addDate(dates) {
5335
+ // no code
5336
+ }
5260
5337
  };
5261
5338
  __decorate$1([
5262
5339
  Property(null)
@@ -5273,6 +5350,9 @@ __decorate$1([
5273
5350
  __decorate$1([
5274
5351
  Property(null)
5275
5352
  ], DatePicker.prototype, "format", void 0);
5353
+ __decorate$1([
5354
+ Property(null)
5355
+ ], DatePicker.prototype, "inputFormats", void 0);
5276
5356
  __decorate$1([
5277
5357
  Property(true)
5278
5358
  ], DatePicker.prototype, "enabled", void 0);
@@ -10514,8 +10594,9 @@ let TimePicker = class TimePicker extends Component {
10514
10594
  popupCreation() {
10515
10595
  this.popupWrapper = this.createElement('div', {
10516
10596
  className: ROOT$3 + ' ' + POPUP$2,
10517
- attrs: { 'id': this.element.id + '_popup', 'style': 'visibility:hidden' }
10597
+ attrs: { 'id': this.element.id + '_popup' }
10518
10598
  });
10599
+ this.popupWrapper.style.visibility = 'hidden';
10519
10600
  this.popupWrapper.setAttribute('aria-label', this.element.id);
10520
10601
  this.popupWrapper.setAttribute('role', 'dialog');
10521
10602
  if (!isNullOrUndefined(this.cssClass)) {
@@ -13162,10 +13243,12 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
13162
13243
  }
13163
13244
  else {
13164
13245
  if (!this.readonly) {
13165
- this.dateTimeWrapper = createElement('div', {
13246
+ const dateTimeWrapperElement = createElement('div', {
13166
13247
  className: ROOT$4 + ' ' + POPUP$3,
13167
- attrs: { 'id': this.element.id + '_timepopup', 'style': 'visibility:hidden ; display:block' }
13248
+ attrs: { 'id': this.element.id + '_timepopup' }
13168
13249
  });
13250
+ dateTimeWrapperElement.style.cssText = 'visibility: hidden; display: block;';
13251
+ this.dateTimeWrapper = dateTimeWrapperElement;
13169
13252
  if (!isNullOrUndefined(this.cssClass)) {
13170
13253
  this.dateTimeWrapper.className += ' ' + this.cssClass;
13171
13254
  }
@@ -15277,6 +15360,11 @@ class MaskedDateTime {
15277
15360
  this.previousHiddenMask = this.hiddenMask;
15278
15361
  this.previousValue = inputValue;
15279
15362
  this.parent.updateInputValue(inputValue);
15363
+ if (this.parent.strictMode && (this.dayTypeCount !== 0 || this.monthTypeCount !== 0)) {
15364
+ this.isLeadingZero = false;
15365
+ }
15366
+ this.dayTypeCount = 0;
15367
+ this.monthTypeCount = 0;
15280
15368
  }
15281
15369
  destroy() {
15282
15370
  this.removeEventListener();