@syncfusion/ej2-calendars 20.1.56 → 20.2.36
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/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 +115 -14
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +117 -14
- 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/helpers/e2e/calendarHelper.js +86 -70
- package/helpers/e2e/datepickerHelper.js +95 -79
- package/helpers/e2e/daterangepickerHelper.js +128 -112
- package/helpers/e2e/datetimepickerHelper.js +125 -109
- package/helpers/e2e/index.js +12 -10
- package/helpers/e2e/timepickerHelper.js +62 -46
- package/package.json +10 -10
- package/src/calendar/calendar.js +4 -0
- package/src/datepicker/datepicker.d.ts +1 -0
- package/src/datepicker/datepicker.js +2 -0
- package/src/daterangepicker/daterangepicker.d.ts +2 -0
- package/src/daterangepicker/daterangepicker.js +62 -8
- package/src/maskbase/interface.d.ts +1 -0
- package/src/maskbase/masked-date-time.d.ts +2 -0
- package/src/maskbase/masked-date-time.js +49 -6
- package/styles/bootstrap-dark.css +96 -491
- package/styles/bootstrap.css +96 -491
- package/styles/bootstrap4.css +96 -493
- package/styles/bootstrap5-dark.css +97 -499
- package/styles/bootstrap5.css +97 -499
- package/styles/calendar/_fusionnew-definition.scss +224 -0
- package/styles/calendar/_material3-definition.scss +224 -0
- package/styles/calendar/bootstrap-dark.css +50 -238
- package/styles/calendar/bootstrap.css +50 -238
- package/styles/calendar/bootstrap4.css +50 -238
- package/styles/calendar/bootstrap5-dark.css +51 -246
- package/styles/calendar/bootstrap5.css +51 -246
- package/styles/calendar/fabric-dark.css +50 -237
- package/styles/calendar/fabric.css +50 -238
- package/styles/calendar/fluent-dark.css +56 -270
- package/styles/calendar/fluent.css +56 -270
- package/styles/calendar/highcontrast-light.css +50 -238
- package/styles/calendar/highcontrast.css +50 -238
- package/styles/calendar/icons/_fusionnew.scss +12 -0
- package/styles/calendar/icons/_material3.scss +12 -0
- package/styles/calendar/material-dark.css +50 -238
- package/styles/calendar/material.css +50 -238
- package/styles/calendar/tailwind-dark.css +53 -261
- package/styles/calendar/tailwind.css +53 -261
- package/styles/datepicker/_fusionnew-definition.scss +42 -0
- package/styles/datepicker/_material3-definition.scss +42 -0
- package/styles/datepicker/bootstrap-dark.css +7 -20
- package/styles/datepicker/bootstrap.css +7 -20
- package/styles/datepicker/bootstrap4.css +7 -21
- package/styles/datepicker/bootstrap5-dark.css +7 -20
- package/styles/datepicker/bootstrap5.css +7 -20
- package/styles/datepicker/fabric-dark.css +7 -20
- package/styles/datepicker/fabric.css +7 -20
- package/styles/datepicker/fluent-dark.css +7 -21
- package/styles/datepicker/fluent.css +7 -21
- package/styles/datepicker/highcontrast-light.css +7 -21
- package/styles/datepicker/highcontrast.css +7 -21
- package/styles/datepicker/icons/_fusionnew.scss +55 -0
- package/styles/datepicker/icons/_material3.scss +55 -0
- package/styles/datepicker/material-dark.css +7 -22
- package/styles/datepicker/material.css +7 -23
- package/styles/datepicker/tailwind-dark.css +7 -21
- package/styles/datepicker/tailwind.css +7 -21
- package/styles/daterangepicker/_fusionnew-definition.scss +223 -0
- package/styles/daterangepicker/_material3-definition.scss +223 -0
- package/styles/daterangepicker/bootstrap-dark.css +32 -184
- package/styles/daterangepicker/bootstrap.css +32 -184
- package/styles/daterangepicker/bootstrap4.css +32 -185
- package/styles/daterangepicker/bootstrap5-dark.css +32 -185
- package/styles/daterangepicker/bootstrap5.css +32 -185
- package/styles/daterangepicker/fabric-dark.css +32 -184
- package/styles/daterangepicker/fabric.css +32 -184
- package/styles/daterangepicker/fluent-dark.css +35 -188
- package/styles/daterangepicker/fluent.css +35 -188
- package/styles/daterangepicker/highcontrast-light.css +32 -184
- package/styles/daterangepicker/highcontrast.css +32 -184
- package/styles/daterangepicker/icons/_fusionnew.scss +67 -0
- package/styles/daterangepicker/icons/_material3.scss +67 -0
- package/styles/daterangepicker/material-dark.css +32 -185
- package/styles/daterangepicker/material.css +32 -186
- package/styles/daterangepicker/tailwind-dark.css +31 -178
- package/styles/daterangepicker/tailwind.css +31 -178
- package/styles/datetimepicker/_fusionnew-definition.scss +55 -0
- package/styles/datetimepicker/_material3-definition.scss +55 -0
- package/styles/datetimepicker/bootstrap-dark.css +7 -30
- package/styles/datetimepicker/bootstrap.css +7 -30
- package/styles/datetimepicker/bootstrap4.css +7 -30
- package/styles/datetimepicker/bootstrap5-dark.css +7 -30
- package/styles/datetimepicker/bootstrap5.css +7 -30
- package/styles/datetimepicker/fabric-dark.css +7 -30
- package/styles/datetimepicker/fabric.css +7 -30
- package/styles/datetimepicker/fluent-dark.css +7 -30
- package/styles/datetimepicker/fluent.css +7 -30
- package/styles/datetimepicker/highcontrast-light.css +7 -30
- package/styles/datetimepicker/highcontrast.css +7 -30
- package/styles/datetimepicker/icons/_fusionnew.scss +11 -0
- package/styles/datetimepicker/icons/_material3.scss +11 -0
- package/styles/datetimepicker/material-dark.css +7 -31
- package/styles/datetimepicker/material.css +7 -32
- package/styles/datetimepicker/tailwind-dark.css +7 -30
- package/styles/datetimepicker/tailwind.css +7 -30
- package/styles/fabric-dark.css +96 -490
- package/styles/fabric.css +96 -491
- package/styles/fluent-dark.css +105 -527
- package/styles/fluent.css +105 -527
- package/styles/highcontrast-light.css +96 -492
- package/styles/highcontrast.css +96 -492
- package/styles/material-dark.css +96 -496
- package/styles/material.css +96 -500
- package/styles/tailwind-dark.css +98 -509
- package/styles/tailwind.css +98 -509
- package/styles/timepicker/_fusionnew-definition.scss +52 -0
- package/styles/timepicker/_material3-definition.scss +52 -0
- package/styles/timepicker/bootstrap-dark.css +4 -22
- package/styles/timepicker/bootstrap.css +4 -22
- package/styles/timepicker/bootstrap4.css +4 -22
- package/styles/timepicker/bootstrap5-dark.css +4 -22
- package/styles/timepicker/bootstrap5.css +4 -22
- package/styles/timepicker/fabric-dark.css +4 -22
- package/styles/timepicker/fabric.css +4 -22
- package/styles/timepicker/fluent-dark.css +4 -22
- package/styles/timepicker/fluent.css +4 -22
- package/styles/timepicker/highcontrast-light.css +4 -22
- package/styles/timepicker/highcontrast.css +4 -22
- package/styles/timepicker/icons/_fusionnew.scss +13 -0
- package/styles/timepicker/icons/_material3.scss +13 -0
- package/styles/timepicker/material-dark.css +4 -23
- package/styles/timepicker/material.css +4 -24
- package/styles/timepicker/tailwind-dark.css +4 -22
- package/styles/timepicker/tailwind.css +4 -22
|
@@ -33,6 +33,7 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
33
33
|
this.isHiddenMask = false;
|
|
34
34
|
this.isComplete = false;
|
|
35
35
|
this.isNavigate = false;
|
|
36
|
+
this.navigated = false;
|
|
36
37
|
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;
|
|
37
38
|
this.isDeletion = false;
|
|
38
39
|
this.isShortYear = false;
|
|
@@ -152,6 +153,7 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
152
153
|
this.parent.inputElement.setSelectionRange(start, end);
|
|
153
154
|
};
|
|
154
155
|
MaskedDateTime.prototype.maskKeydownHandler = function (args) {
|
|
156
|
+
this.dayTypeCount = this.monthTypeCount = this.hourTypeCount = this.minuteTypeCount = this.secondTypeCount = 0;
|
|
155
157
|
if (args.e.key === 'Delete') {
|
|
156
158
|
this.isDeleteKey = true;
|
|
157
159
|
return;
|
|
@@ -185,6 +187,10 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
185
187
|
this.validCharacterCheck();
|
|
186
188
|
}
|
|
187
189
|
};
|
|
190
|
+
MaskedDateTime.prototype.isPersist = function () {
|
|
191
|
+
var isPersist = this.parent.isFocused || this.navigated;
|
|
192
|
+
return isPersist;
|
|
193
|
+
};
|
|
188
194
|
MaskedDateTime.prototype.differenceCheck = function () {
|
|
189
195
|
var start = this.parent.inputElement.selectionStart;
|
|
190
196
|
var inputValue = this.parent.inputElement.value;
|
|
@@ -204,8 +210,10 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
204
210
|
}
|
|
205
211
|
switch (this.previousHiddenMask[start - 1]) {
|
|
206
212
|
case 'd':
|
|
207
|
-
var date = (this.isDayPart && newDateValue.getDate().toString().length < 2 ? newDateValue.getDate() * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
213
|
+
var date = (this.isDayPart && newDateValue.getDate().toString().length < 2 && !this.isPersist() ? newDateValue.getDate() * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
208
214
|
this.isDateZero = (newVal[start - 1] == '0');
|
|
215
|
+
this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
|
|
216
|
+
this.navigated = this.navigated ? false : this.navigated;
|
|
209
217
|
if (isNaN(date)) {
|
|
210
218
|
return;
|
|
211
219
|
}
|
|
@@ -229,12 +237,14 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
229
237
|
break;
|
|
230
238
|
case 'M':
|
|
231
239
|
var month = void 0;
|
|
232
|
-
if (newDateValue.getMonth().toString().length < 2) {
|
|
240
|
+
if (newDateValue.getMonth().toString().length < 2 && !this.isPersist()) {
|
|
233
241
|
month = (this.isMonthPart ? (newDateValue.getMonth() + 1) * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
234
242
|
}
|
|
235
243
|
else {
|
|
236
244
|
month = parseInt(newVal[start - 1], 10);
|
|
237
245
|
}
|
|
246
|
+
this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
|
|
247
|
+
this.navigated = this.navigated ? false : this.navigated;
|
|
238
248
|
this.isMonthZero = (newVal[start - 1] == '0');
|
|
239
249
|
if (!isNaN(month)) {
|
|
240
250
|
while (month > 12) {
|
|
@@ -307,7 +317,9 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
307
317
|
}
|
|
308
318
|
break;
|
|
309
319
|
case 'h':
|
|
310
|
-
this.hour = (this.isHourPart && (newDateValue.getHours() % 12 || 12).toString().length < 2 ? (newDateValue.getHours() % 12 || 12) * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
320
|
+
this.hour = (this.isHourPart && (newDateValue.getHours() % 12 || 12).toString().length < 2 && !this.isPersist() ? (newDateValue.getHours() % 12 || 12) * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
321
|
+
this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
|
|
322
|
+
this.navigated = this.navigated ? false : this.navigated;
|
|
311
323
|
if (isNaN(this.hour)) {
|
|
312
324
|
return;
|
|
313
325
|
}
|
|
@@ -320,7 +332,9 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
320
332
|
this.hourTypeCount = this.hourTypeCount + 1;
|
|
321
333
|
break;
|
|
322
334
|
case 'H':
|
|
323
|
-
this.hour = (this.isHourPart && newDateValue.getHours().toString().length < 2 ? newDateValue.getHours() * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
335
|
+
this.hour = (this.isHourPart && newDateValue.getHours().toString().length < 2 && !this.isPersist() ? newDateValue.getHours() * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
336
|
+
this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
|
|
337
|
+
this.navigated = this.navigated ? false : this.navigated;
|
|
324
338
|
if (isNaN(this.hour)) {
|
|
325
339
|
return;
|
|
326
340
|
}
|
|
@@ -333,7 +347,9 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
333
347
|
this.hourTypeCount = this.hourTypeCount + 1;
|
|
334
348
|
break;
|
|
335
349
|
case 'm':
|
|
336
|
-
var minutes = (this.isMinutePart && newDateValue.getMinutes().toString().length < 2 ? newDateValue.getMinutes() * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
350
|
+
var minutes = (this.isMinutePart && newDateValue.getMinutes().toString().length < 2 && !this.isPersist() ? newDateValue.getMinutes() * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
351
|
+
this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
|
|
352
|
+
this.navigated = this.navigated ? false : this.navigated;
|
|
337
353
|
if (isNaN(minutes)) {
|
|
338
354
|
return;
|
|
339
355
|
}
|
|
@@ -346,7 +362,9 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
346
362
|
this.minuteTypeCount = this.minuteTypeCount + 1;
|
|
347
363
|
break;
|
|
348
364
|
case 's':
|
|
349
|
-
var seconds = (this.isSecondsPart && newDateValue.getSeconds().toString().length < 2 ? newDateValue.getSeconds() * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
365
|
+
var seconds = (this.isSecondsPart && newDateValue.getSeconds().toString().length < 2 && !this.isPersist() ? newDateValue.getSeconds() * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
366
|
+
this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
|
|
367
|
+
this.navigated = this.navigated ? false : this.navigated;
|
|
350
368
|
if (isNaN(seconds)) {
|
|
351
369
|
return;
|
|
352
370
|
}
|
|
@@ -401,6 +419,10 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
401
419
|
case 'd':
|
|
402
420
|
result = proxy.isDayPart ? proxy.maskDateValue.getDate().toString() : proxy.defaultConstant['day'].toString();
|
|
403
421
|
result = proxy.zeroCheck(proxy.isDateZero, proxy.isDayPart, result);
|
|
422
|
+
if (proxy.dayTypeCount == 2) {
|
|
423
|
+
proxy.isNavigate = true;
|
|
424
|
+
proxy.dayTypeCount = 0;
|
|
425
|
+
}
|
|
404
426
|
break;
|
|
405
427
|
case 'dd':
|
|
406
428
|
result = proxy.isDayPart ? proxy.roundOff(proxy.maskDateValue.getDate(), 2) : proxy.defaultConstant['day'].toString();
|
|
@@ -424,6 +446,10 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
424
446
|
case 'M':
|
|
425
447
|
result = proxy.isMonthPart ? (proxy.maskDateValue.getMonth() + 1).toString() : proxy.defaultConstant['month'].toString();
|
|
426
448
|
result = proxy.zeroCheck(proxy.isMonthZero, proxy.isMonthPart, result);
|
|
449
|
+
if (proxy.monthTypeCount == 2) {
|
|
450
|
+
proxy.isNavigate = true;
|
|
451
|
+
proxy.monthTypeCount = 0;
|
|
452
|
+
}
|
|
427
453
|
break;
|
|
428
454
|
case 'MM':
|
|
429
455
|
result = proxy.isMonthPart ? proxy.roundOff(proxy.maskDateValue.getMonth() + 1, 2) : proxy.defaultConstant['month'].toString();
|
|
@@ -453,6 +479,10 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
453
479
|
break;
|
|
454
480
|
case 'h':
|
|
455
481
|
result = proxy.isHourPart ? (proxy.maskDateValue.getHours() % 12 || 12).toString() : proxy.defaultConstant['hour'].toString();
|
|
482
|
+
if (proxy.hourTypeCount == 2) {
|
|
483
|
+
proxy.isNavigate = true;
|
|
484
|
+
proxy.hourTypeCount = 0;
|
|
485
|
+
}
|
|
456
486
|
break;
|
|
457
487
|
case 'hh':
|
|
458
488
|
result = proxy.isHourPart ? proxy.roundOff(proxy.maskDateValue.getHours() % 12 || 12, 2) : proxy.defaultConstant['hour'].toString();
|
|
@@ -463,6 +493,10 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
463
493
|
break;
|
|
464
494
|
case 'H':
|
|
465
495
|
result = proxy.isHourPart ? proxy.maskDateValue.getHours().toString() : proxy.defaultConstant['hour'].toString();
|
|
496
|
+
if (proxy.hourTypeCount == 2) {
|
|
497
|
+
proxy.isNavigate = true;
|
|
498
|
+
proxy.hourTypeCount = 0;
|
|
499
|
+
}
|
|
466
500
|
break;
|
|
467
501
|
case 'HH':
|
|
468
502
|
result = proxy.isHourPart ? proxy.roundOff(proxy.maskDateValue.getHours(), 2) : proxy.defaultConstant['hour'].toString();
|
|
@@ -473,6 +507,10 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
473
507
|
break;
|
|
474
508
|
case 'm':
|
|
475
509
|
result = proxy.isMinutePart ? proxy.maskDateValue.getMinutes().toString() : proxy.defaultConstant['minute'].toString();
|
|
510
|
+
if (proxy.minuteTypeCount == 2) {
|
|
511
|
+
proxy.isNavigate = true;
|
|
512
|
+
proxy.minuteTypeCount = 0;
|
|
513
|
+
}
|
|
476
514
|
break;
|
|
477
515
|
case 'mm':
|
|
478
516
|
result = proxy.isMinutePart ? proxy.roundOff(proxy.maskDateValue.getMinutes(), 2) : proxy.defaultConstant['minute'].toString();
|
|
@@ -483,6 +521,10 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
483
521
|
break;
|
|
484
522
|
case 's':
|
|
485
523
|
result = proxy.isSecondsPart ? proxy.maskDateValue.getSeconds().toString() : proxy.defaultConstant['second'].toString();
|
|
524
|
+
if (proxy.secondTypeCount == 2) {
|
|
525
|
+
proxy.isNavigate = true;
|
|
526
|
+
proxy.secondTypeCount = 0;
|
|
527
|
+
}
|
|
486
528
|
break;
|
|
487
529
|
case 'ss':
|
|
488
530
|
result = proxy.isSecondsPart ? proxy.roundOff(proxy.maskDateValue.getSeconds(), 2) : proxy.defaultConstant['second'].toString();
|
|
@@ -561,6 +603,7 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
561
603
|
var start = this.parent.inputElement.selectionStart;
|
|
562
604
|
var end = this.parent.inputElement.selectionEnd;
|
|
563
605
|
var formatIndex = isbackward ? start - 1 : end + 1;
|
|
606
|
+
this.navigated = true;
|
|
564
607
|
while (formatIndex < this.hiddenMask.length && formatIndex >= 0) {
|
|
565
608
|
if (this.validCharacters.indexOf(this.hiddenMask[formatIndex]) >= 0) {
|
|
566
609
|
this.setSelection(this.hiddenMask[formatIndex]);
|