@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.
- package/README.md +1 -1
- package/dist/ej2-calendars.min.js +2 -2
- package/dist/ej2-calendars.umd.min.js +2 -2
- package/dist/ej2-calendars.umd.min.js.map +1 -1
- package/dist/es6/ej2-calendars.es2015.js +99 -8
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +102 -8
- package/dist/es6/ej2-calendars.es5.js.map +1 -1
- package/dist/global/ej2-calendars.min.js +2 -2
- package/dist/global/ej2-calendars.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +11 -11
- package/src/datepicker/datepicker-model.d.ts +8 -0
- package/src/datepicker/datepicker.d.ts +17 -2
- package/src/datepicker/datepicker.js +84 -1
- package/src/daterangepicker/daterangepicker.js +1 -1
- package/src/datetimepicker/datetimepicker.js +4 -2
- package/src/maskbase/interface.d.ts +1 -0
- package/src/maskbase/masked-date-time.js +8 -1
- package/src/timepicker/timepicker.js +5 -3
- package/styles/bds-lite.css +6 -6
- package/styles/bds.css +6 -6
- package/styles/bootstrap-dark-lite.css +11 -11
- package/styles/bootstrap-dark.css +16 -16
- package/styles/bootstrap-lite.css +11 -11
- package/styles/bootstrap.css +16 -16
- package/styles/bootstrap4-lite.css +31 -31
- package/styles/bootstrap4.css +45 -45
- package/styles/bootstrap5-dark-lite.css +67 -67
- package/styles/bootstrap5-dark.css +102 -102
- package/styles/bootstrap5-lite.css +26 -26
- package/styles/bootstrap5.3-lite.css +6 -6
- package/styles/bootstrap5.3.css +6 -6
- package/styles/bootstrap5.css +31 -31
- package/styles/calendar/_bigger.scss +3 -0
- package/styles/calendar/_bootstrap-dark-definition.scss +4 -2
- package/styles/calendar/_bootstrap-definition.scss +4 -2
- package/styles/calendar/_bootstrap4-definition.scss +12 -10
- package/styles/calendar/_bootstrap5-definition.scss +4 -2
- package/styles/calendar/_fabric-definition.scss +3 -1
- package/styles/calendar/_fluent2-definition.scss +1 -0
- package/styles/calendar/_fusionnew-definition.scss +4 -2
- package/styles/calendar/_highcontrast-definition.scss +3 -1
- package/styles/calendar/_material-definition.scss +3 -1
- package/styles/calendar/_tailwind-definition.scss +4 -2
- package/styles/calendar/_theme.scss +1 -1
- package/styles/calendar/bootstrap-dark.css +4 -4
- package/styles/calendar/bootstrap.css +4 -4
- package/styles/calendar/bootstrap4.css +24 -24
- package/styles/calendar/bootstrap5-dark.css +53 -53
- package/styles/calendar/bootstrap5.css +14 -14
- package/styles/calendar/fabric-dark.css +12 -12
- package/styles/calendar/fabric.css +4 -4
- package/styles/calendar/fluent-dark.css +2 -2
- package/styles/calendar/fluent.css +2 -2
- package/styles/calendar/fluent2.css +1 -0
- package/styles/calendar/highcontrast.css +2 -2
- package/styles/calendar/material.css +2 -2
- package/styles/calendar/tailwind-dark.css +17 -17
- package/styles/calendar/tailwind.css +4 -4
- package/styles/calendar/tailwind3.css +2 -2
- package/styles/datepicker/_bootstrap4-definition.scss +4 -2
- package/styles/datepicker/_layout.scss +3 -1
- package/styles/datepicker/bootstrap4.css +2 -2
- package/styles/datepicker/bootstrap5-dark.css +4 -4
- package/styles/datepicker/bootstrap5.css +1 -1
- package/styles/datepicker/fluent2.css +3 -1
- package/styles/daterangepicker/_bootstrap-dark-definition.scss +4 -2
- package/styles/daterangepicker/_bootstrap-definition.scss +4 -2
- package/styles/daterangepicker/_bootstrap4-definition.scss +6 -4
- package/styles/daterangepicker/_fabric-dark-definition.scss +3 -1
- package/styles/daterangepicker/_fabric-definition.scss +3 -1
- package/styles/daterangepicker/_fusionnew-definition.scss +1 -1
- package/styles/daterangepicker/_highcontrast-definition.scss +6 -4
- package/styles/daterangepicker/_highcontrast-light-definition.scss +5 -3
- package/styles/daterangepicker/_layout.scss +14 -10
- package/styles/daterangepicker/_material-dark-definition.scss +3 -1
- package/styles/daterangepicker/_material-definition.scss +3 -1
- package/styles/daterangepicker/bds.css +6 -6
- package/styles/daterangepicker/bootstrap-dark.css +12 -12
- package/styles/daterangepicker/bootstrap.css +12 -12
- package/styles/daterangepicker/bootstrap4.css +12 -12
- package/styles/daterangepicker/bootstrap5-dark.css +36 -36
- package/styles/daterangepicker/bootstrap5.3.css +6 -6
- package/styles/daterangepicker/bootstrap5.css +14 -14
- package/styles/daterangepicker/fabric-dark.css +12 -12
- package/styles/daterangepicker/fabric.css +8 -8
- package/styles/daterangepicker/fluent-dark.css +10 -10
- package/styles/daterangepicker/fluent.css +10 -10
- package/styles/daterangepicker/fluent2.css +6 -6
- package/styles/daterangepicker/highcontrast-light.css +14 -14
- package/styles/daterangepicker/highcontrast.css +16 -16
- package/styles/daterangepicker/material-dark.css +8 -8
- package/styles/daterangepicker/material.css +8 -8
- package/styles/daterangepicker/material3-dark.css +6 -6
- package/styles/daterangepicker/material3.css +6 -6
- package/styles/daterangepicker/tailwind-dark.css +23 -23
- package/styles/daterangepicker/tailwind.css +6 -6
- package/styles/daterangepicker/tailwind3.css +6 -6
- package/styles/datetimepicker/_bootstrap4-definition.scss +5 -3
- package/styles/datetimepicker/bootstrap4.css +3 -3
- package/styles/datetimepicker/bootstrap5-dark.css +3 -3
- package/styles/fabric-dark-lite.css +15 -15
- package/styles/fabric-dark.css +24 -24
- package/styles/fabric-lite.css +9 -9
- package/styles/fabric.css +12 -12
- package/styles/fluent-dark-lite.css +12 -12
- package/styles/fluent-dark.css +12 -12
- package/styles/fluent-lite.css +12 -12
- package/styles/fluent.css +12 -12
- package/styles/fluent2-lite.css +9 -7
- package/styles/fluent2.css +10 -7
- package/styles/highcontrast-light-lite.css +10 -10
- package/styles/highcontrast-light.css +14 -14
- package/styles/highcontrast-lite.css +12 -12
- package/styles/highcontrast.css +18 -18
- package/styles/material-dark-lite.css +7 -7
- package/styles/material-dark.css +8 -8
- package/styles/material-lite.css +8 -8
- package/styles/material.css +10 -10
- package/styles/material3-dark-lite.css +6 -6
- package/styles/material3-dark.css +6 -6
- package/styles/material3-lite.css +6 -6
- package/styles/material3.css +6 -6
- package/styles/tailwind-dark-lite.css +26 -26
- package/styles/tailwind-dark.css +41 -41
- package/styles/tailwind-lite.css +8 -8
- package/styles/tailwind.css +10 -10
- package/styles/tailwind3-lite.css +8 -8
- package/styles/tailwind3.css +8 -8
- package/styles/timepicker/_bootstrap4-definition.scss +6 -4
- package/styles/timepicker/_bootstrap5-definition.scss +3 -1
- package/styles/timepicker/_fluent-definition.scss +3 -1
- package/styles/timepicker/bootstrap4.css +4 -4
- package/styles/timepicker/bootstrap5-dark.css +6 -6
- package/styles/timepicker/bootstrap5.css +2 -2
- 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);
|
|
@@ -6373,7 +6453,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6373
6453
|
this.updateHiddenInput();
|
|
6374
6454
|
}
|
|
6375
6455
|
getStartEndDate(date, isEnd) {
|
|
6376
|
-
if (this.currentView() === 'Year' && !isNullOrUndefined(date)) {
|
|
6456
|
+
if ((this.currentView() === 'Year' && !isNullOrUndefined(date)) || this.depth === 'Year') {
|
|
6377
6457
|
return new Date(date.getFullYear(), date.getMonth() + (isEnd ? 1 : 0), isEnd ? 0 : 1);
|
|
6378
6458
|
}
|
|
6379
6459
|
else if (this.currentView() === 'Decade' && !isNullOrUndefined(date)) {
|
|
@@ -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'
|
|
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)) {
|
|
@@ -11122,8 +11203,9 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11122
11203
|
}
|
|
11123
11204
|
else {
|
|
11124
11205
|
if (!isNavigation) {
|
|
11125
|
-
|
|
11126
|
-
|
|
11206
|
+
const value = this.compareFormatChange(this.inputElement.value);
|
|
11207
|
+
if ((+this.prevDate !== +value) || isNullOrUndefined(this.checkDateValue(this.value))) {
|
|
11208
|
+
this.valueProcess(event, value);
|
|
11127
11209
|
}
|
|
11128
11210
|
}
|
|
11129
11211
|
else {
|
|
@@ -13161,10 +13243,12 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13161
13243
|
}
|
|
13162
13244
|
else {
|
|
13163
13245
|
if (!this.readonly) {
|
|
13164
|
-
|
|
13246
|
+
const dateTimeWrapperElement = createElement('div', {
|
|
13165
13247
|
className: ROOT$4 + ' ' + POPUP$3,
|
|
13166
|
-
attrs: { 'id': this.element.id + '_timepopup'
|
|
13248
|
+
attrs: { 'id': this.element.id + '_timepopup' }
|
|
13167
13249
|
});
|
|
13250
|
+
dateTimeWrapperElement.style.cssText = 'visibility: hidden; display: block;';
|
|
13251
|
+
this.dateTimeWrapper = dateTimeWrapperElement;
|
|
13168
13252
|
if (!isNullOrUndefined(this.cssClass)) {
|
|
13169
13253
|
this.dateTimeWrapper.className += ' ' + this.cssClass;
|
|
13170
13254
|
}
|
|
@@ -14399,7 +14483,7 @@ class MaskedDateTime {
|
|
|
14399
14483
|
this.isNavigate = false;
|
|
14400
14484
|
this.navigated = false;
|
|
14401
14485
|
this.isBlur = false;
|
|
14402
|
-
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;
|
|
14486
|
+
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;
|
|
14403
14487
|
this.isDeletion = false;
|
|
14404
14488
|
this.isShortYear = false;
|
|
14405
14489
|
this.isDeleteKey = false;
|
|
@@ -14894,9 +14978,11 @@ class MaskedDateTime {
|
|
|
14894
14978
|
case 'E':
|
|
14895
14979
|
case 'EE':
|
|
14896
14980
|
case 'EEE':
|
|
14981
|
+
case 'ccc':
|
|
14897
14982
|
result = proxy.isDayPart && proxy.isMonthPart && proxy.isYearPart ? daysAbbreviated[dayKeyAbbreviated[proxy.maskDateValue.getDay()]].toString() : proxy.defaultConstant['dayOfTheWeek'].toString();
|
|
14898
14983
|
break;
|
|
14899
14984
|
case 'EEEE':
|
|
14985
|
+
case 'cccc':
|
|
14900
14986
|
result = proxy.isDayPart && proxy.isMonthPart && proxy.isYearPart ? daysWide[dayKeyWide[proxy.maskDateValue.getDay()]].toString() : proxy.defaultConstant['dayOfTheWeek'].toString();
|
|
14901
14987
|
break;
|
|
14902
14988
|
case 'EEEEE':
|
|
@@ -15274,6 +15360,11 @@ class MaskedDateTime {
|
|
|
15274
15360
|
this.previousHiddenMask = this.hiddenMask;
|
|
15275
15361
|
this.previousValue = inputValue;
|
|
15276
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;
|
|
15277
15368
|
}
|
|
15278
15369
|
destroy() {
|
|
15279
15370
|
this.removeEventListener();
|