@syncfusion/ej2-calendars 28.2.11 → 29.1.35
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 +92 -4
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +95 -4
- 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/datetimepicker/datetimepicker.js +4 -2
- package/src/maskbase/interface.d.ts +1 -0
- package/src/maskbase/masked-date-time.js +5 -0
- package/src/timepicker/timepicker.js +2 -1
- 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
|
@@ -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);
|
|
@@ -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'
|
|
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)) {
|
|
@@ -13305,10 +13389,12 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
13305
13389
|
}
|
|
13306
13390
|
else {
|
|
13307
13391
|
if (!this.readonly) {
|
|
13308
|
-
|
|
13392
|
+
var dateTimeWrapperElement = createElement('div', {
|
|
13309
13393
|
className: ROOT$4 + ' ' + POPUP$3,
|
|
13310
|
-
attrs: { 'id': this.element.id + '_timepopup'
|
|
13394
|
+
attrs: { 'id': this.element.id + '_timepopup' }
|
|
13311
13395
|
});
|
|
13396
|
+
dateTimeWrapperElement.style.cssText = 'visibility: hidden; display: block;';
|
|
13397
|
+
this.dateTimeWrapper = dateTimeWrapperElement;
|
|
13312
13398
|
if (!isNullOrUndefined(this.cssClass)) {
|
|
13313
13399
|
this.dateTimeWrapper.className += ' ' + this.cssClass;
|
|
13314
13400
|
}
|
|
@@ -15427,6 +15513,11 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
|
|
|
15427
15513
|
this.previousHiddenMask = this.hiddenMask;
|
|
15428
15514
|
this.previousValue = inputValue;
|
|
15429
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;
|
|
15430
15521
|
};
|
|
15431
15522
|
MaskedDateTime.prototype.destroy = function () {
|
|
15432
15523
|
this.removeEventListener();
|