@syncfusion/ej2-calendars 20.1.56 → 20.1.57

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 (109) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/ej2-calendars.umd.min.js +2 -2
  3. package/dist/ej2-calendars.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-calendars.es2015.js +115 -14
  5. package/dist/es6/ej2-calendars.es2015.js.map +1 -1
  6. package/dist/es6/ej2-calendars.es5.js +117 -14
  7. package/dist/es6/ej2-calendars.es5.js.map +1 -1
  8. package/dist/global/ej2-calendars.min.js +2 -2
  9. package/dist/global/ej2-calendars.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +6 -6
  12. package/src/calendar/calendar.js +4 -0
  13. package/src/datepicker/datepicker.d.ts +1 -0
  14. package/src/datepicker/datepicker.js +2 -0
  15. package/src/daterangepicker/daterangepicker.d.ts +2 -0
  16. package/src/daterangepicker/daterangepicker.js +62 -8
  17. package/src/maskbase/interface.d.ts +1 -0
  18. package/src/maskbase/masked-date-time.d.ts +2 -0
  19. package/src/maskbase/masked-date-time.js +49 -6
  20. package/styles/bootstrap-dark.css +96 -491
  21. package/styles/bootstrap.css +96 -491
  22. package/styles/bootstrap4.css +96 -493
  23. package/styles/bootstrap5-dark.css +97 -499
  24. package/styles/bootstrap5.css +97 -499
  25. package/styles/calendar/bootstrap-dark.css +50 -238
  26. package/styles/calendar/bootstrap.css +50 -238
  27. package/styles/calendar/bootstrap4.css +50 -238
  28. package/styles/calendar/bootstrap5-dark.css +51 -246
  29. package/styles/calendar/bootstrap5.css +51 -246
  30. package/styles/calendar/fabric-dark.css +50 -237
  31. package/styles/calendar/fabric.css +50 -238
  32. package/styles/calendar/fluent-dark.css +56 -270
  33. package/styles/calendar/fluent.css +56 -270
  34. package/styles/calendar/highcontrast-light.css +50 -238
  35. package/styles/calendar/highcontrast.css +50 -238
  36. package/styles/calendar/material-dark.css +50 -238
  37. package/styles/calendar/material.css +50 -238
  38. package/styles/calendar/tailwind-dark.css +53 -261
  39. package/styles/calendar/tailwind.css +53 -261
  40. package/styles/datepicker/bootstrap-dark.css +7 -20
  41. package/styles/datepicker/bootstrap.css +7 -20
  42. package/styles/datepicker/bootstrap4.css +7 -21
  43. package/styles/datepicker/bootstrap5-dark.css +7 -20
  44. package/styles/datepicker/bootstrap5.css +7 -20
  45. package/styles/datepicker/fabric-dark.css +7 -20
  46. package/styles/datepicker/fabric.css +7 -20
  47. package/styles/datepicker/fluent-dark.css +7 -21
  48. package/styles/datepicker/fluent.css +7 -21
  49. package/styles/datepicker/highcontrast-light.css +7 -21
  50. package/styles/datepicker/highcontrast.css +7 -21
  51. package/styles/datepicker/material-dark.css +7 -22
  52. package/styles/datepicker/material.css +7 -23
  53. package/styles/datepicker/tailwind-dark.css +7 -21
  54. package/styles/datepicker/tailwind.css +7 -21
  55. package/styles/daterangepicker/bootstrap-dark.css +32 -184
  56. package/styles/daterangepicker/bootstrap.css +32 -184
  57. package/styles/daterangepicker/bootstrap4.css +32 -185
  58. package/styles/daterangepicker/bootstrap5-dark.css +32 -185
  59. package/styles/daterangepicker/bootstrap5.css +32 -185
  60. package/styles/daterangepicker/fabric-dark.css +32 -184
  61. package/styles/daterangepicker/fabric.css +32 -184
  62. package/styles/daterangepicker/fluent-dark.css +35 -188
  63. package/styles/daterangepicker/fluent.css +35 -188
  64. package/styles/daterangepicker/highcontrast-light.css +32 -184
  65. package/styles/daterangepicker/highcontrast.css +32 -184
  66. package/styles/daterangepicker/material-dark.css +32 -185
  67. package/styles/daterangepicker/material.css +32 -186
  68. package/styles/daterangepicker/tailwind-dark.css +31 -178
  69. package/styles/daterangepicker/tailwind.css +31 -178
  70. package/styles/datetimepicker/bootstrap-dark.css +7 -30
  71. package/styles/datetimepicker/bootstrap.css +7 -30
  72. package/styles/datetimepicker/bootstrap4.css +7 -30
  73. package/styles/datetimepicker/bootstrap5-dark.css +7 -30
  74. package/styles/datetimepicker/bootstrap5.css +7 -30
  75. package/styles/datetimepicker/fabric-dark.css +7 -30
  76. package/styles/datetimepicker/fabric.css +7 -30
  77. package/styles/datetimepicker/fluent-dark.css +7 -30
  78. package/styles/datetimepicker/fluent.css +7 -30
  79. package/styles/datetimepicker/highcontrast-light.css +7 -30
  80. package/styles/datetimepicker/highcontrast.css +7 -30
  81. package/styles/datetimepicker/material-dark.css +7 -31
  82. package/styles/datetimepicker/material.css +7 -32
  83. package/styles/datetimepicker/tailwind-dark.css +7 -30
  84. package/styles/datetimepicker/tailwind.css +7 -30
  85. package/styles/fabric-dark.css +96 -490
  86. package/styles/fabric.css +96 -491
  87. package/styles/fluent-dark.css +105 -527
  88. package/styles/fluent.css +105 -527
  89. package/styles/highcontrast-light.css +96 -492
  90. package/styles/highcontrast.css +96 -492
  91. package/styles/material-dark.css +96 -496
  92. package/styles/material.css +96 -500
  93. package/styles/tailwind-dark.css +98 -509
  94. package/styles/tailwind.css +98 -509
  95. package/styles/timepicker/bootstrap-dark.css +4 -22
  96. package/styles/timepicker/bootstrap.css +4 -22
  97. package/styles/timepicker/bootstrap4.css +4 -22
  98. package/styles/timepicker/bootstrap5-dark.css +4 -22
  99. package/styles/timepicker/bootstrap5.css +4 -22
  100. package/styles/timepicker/fabric-dark.css +4 -22
  101. package/styles/timepicker/fabric.css +4 -22
  102. package/styles/timepicker/fluent-dark.css +4 -22
  103. package/styles/timepicker/fluent.css +4 -22
  104. package/styles/timepicker/highcontrast-light.css +4 -22
  105. package/styles/timepicker/highcontrast.css +4 -22
  106. package/styles/timepicker/material-dark.css +4 -23
  107. package/styles/timepicker/material.css +4 -24
  108. package/styles/timepicker/tailwind-dark.css +4 -22
  109. package/styles/timepicker/tailwind.css +4 -22
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.1.56
3
+ * version : 20.1.57
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-calendars@*",
3
- "_id": "@syncfusion/ej2-calendars@20.1.52",
3
+ "_id": "@syncfusion/ej2-calendars@20.1.57",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-gd1cYle0tXgqU2CPzR/O08RwBJvXwOYDXoRovI4WpDBt/RAWgqxeasZC6lC6o5jlQT7UYrPCKJbptS2T57j1nQ==",
5
+ "_integrity": "sha512-lRBwmT180cnE0ZvTsXN4owglGNws7i0guVsm9H/KoqZiXqwNPVgS3DPiSAA6u8okKuewyfwFfmwTLK15f6MVaA==",
6
6
  "_location": "/@syncfusion/ej2-calendars",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -32,8 +32,8 @@
32
32
  "/@syncfusion/ej2-schedule",
33
33
  "/@syncfusion/ej2-vue-calendars"
34
34
  ],
35
- "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-calendars/-/ej2-calendars-20.1.52.tgz",
36
- "_shasum": "b846b9bbfa51f9c9ecead919804e470a035954b5",
35
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-calendars/-/ej2-calendars-20.1.57.tgz",
36
+ "_shasum": "b6d2ec3518ded1dd7a8e8132020d074062a007f4",
37
37
  "_spec": "@syncfusion/ej2-calendars@*",
38
38
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
39
39
  "author": {
@@ -48,7 +48,7 @@
48
48
  "@syncfusion/ej2-buttons": "~20.1.55",
49
49
  "@syncfusion/ej2-inputs": "~20.1.55",
50
50
  "@syncfusion/ej2-lists": "~20.1.55",
51
- "@syncfusion/ej2-popups": "~20.1.55"
51
+ "@syncfusion/ej2-popups": "~20.1.57"
52
52
  },
53
53
  "deprecated": false,
54
54
  "description": "A complete package of date or time components with built-in features such as date formatting, inline editing, multiple (range) selection, range restriction, month and year selection, strict mode, and globalization.",
@@ -81,6 +81,6 @@
81
81
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
82
82
  },
83
83
  "typings": "index.d.ts",
84
- "version": "20.1.56",
84
+ "version": "20.1.57",
85
85
  "sideEffects": false
86
86
  }
@@ -238,6 +238,10 @@ var CalendarBase = /** @class */ (function (_super) {
238
238
  duration: 400,
239
239
  isCenterRipple: true
240
240
  });
241
+ if (this.getModuleName() === 'daterangepicker') {
242
+ attributes(this.previousIcon, { tabIndex: '-1' });
243
+ attributes(this.nextIcon, { tabIndex: '-1' });
244
+ }
241
245
  attributes(this.nextIcon, ariaNextAttrs);
242
246
  this.headerTitleElement = this.createElement('div', { className: '' + LINK + ' ' + TITLE });
243
247
  attributes(this.headerTitleElement, ariaTitleAttrs);
@@ -62,6 +62,7 @@ export declare class DatePicker extends Calendar implements IInput {
62
62
  protected isIconClicked: boolean;
63
63
  protected isDynamicValueChanged: boolean;
64
64
  protected moduleName: string;
65
+ protected isFocused: boolean;
65
66
  /**
66
67
  * Specifies the width of the DatePicker component.
67
68
  *
@@ -85,6 +85,7 @@ var DatePicker = /** @class */ (function (_super) {
85
85
  _this.isIconClicked = false;
86
86
  _this.isDynamicValueChanged = false;
87
87
  _this.moduleName = _this.getModuleName();
88
+ _this.isFocused = false;
88
89
  _this.datepickerOptions = options;
89
90
  return _this;
90
91
  }
@@ -650,6 +651,7 @@ var DatePicker = /** @class */ (function (_super) {
650
651
  }
651
652
  };
652
653
  DatePicker.prototype.inputFocusHandler = function () {
654
+ this.isFocused = true;
653
655
  if (!this.enabled) {
654
656
  return;
655
657
  }
@@ -642,7 +642,9 @@ export declare class DateRangePicker extends CalendarBase {
642
642
  private errorClass;
643
643
  private keyCalendarUpdate;
644
644
  private navInCalendar;
645
+ private firstCellToFocus;
645
646
  private keyInputHandler;
647
+ private tabKeyValidation;
646
648
  private keyNavigation;
647
649
  private inputHandler;
648
650
  private bindCalendarCellEvents;
@@ -344,7 +344,7 @@ var DateRangePicker = /** @class */ (function (_super) {
344
344
  this.validationAttribute(this.element, this.inputElement);
345
345
  }
346
346
  this.checkHtmlAttributes(false);
347
- merge(this.defaultKeyConfigs, { shiftTab: 'shift+tab' });
347
+ merge(this.defaultKeyConfigs, { shiftTab: 'shift+tab', tab: 'tab' });
348
348
  var start = this.checkDateValue(new Date(this.checkValue(this.startValue)));
349
349
  this.setProperties({ startDate: start }, true); // persist the value propeerty.
350
350
  this.setProperties({ endValue: this.checkDateValue(new Date(this.checkValue(this.endValue))) }, true);
@@ -1055,8 +1055,11 @@ var DateRangePicker = /** @class */ (function (_super) {
1055
1055
  }
1056
1056
  }
1057
1057
  };
1058
- DateRangePicker.prototype.keyCalendarUpdate = function (isLeftCalendar, ele) {
1059
- this.removeFocusedDate();
1058
+ DateRangePicker.prototype.keyCalendarUpdate = function (isLeftCalendar, ele, isRemoveFocus) {
1059
+ if (isRemoveFocus === void 0) { isRemoveFocus = true; }
1060
+ if (isRemoveFocus) {
1061
+ this.removeFocusedDate();
1062
+ }
1060
1063
  if (isLeftCalendar) {
1061
1064
  this.leftCalCurrentDate = new Date(+this.currentDate);
1062
1065
  ele = this.leftCalendar;
@@ -1157,8 +1160,37 @@ var DateRangePicker = /** @class */ (function (_super) {
1157
1160
  }
1158
1161
  this.keyNavigation(ele, e);
1159
1162
  break;
1163
+ case 'tab':
1164
+ if (this.tabKeyValidation(ele, LEFTCALENDER)) {
1165
+ ele = this.keyCalendarUpdate(false, ele, false);
1166
+ var focusedCell = ele.querySelector('.e-focused-date');
1167
+ if (isNullOrUndefined(focusedCell)) {
1168
+ this.currentDate = this.firstCellToFocus(this.rightCalendar);
1169
+ }
1170
+ this.keyboardNavigate(0, view, e, max, min);
1171
+ this.keyNavigation(ele, e);
1172
+ }
1173
+ break;
1174
+ case 'shiftTab':
1175
+ if (this.tabKeyValidation(ele, RIGHTCALENDER)) {
1176
+ ele = this.keyCalendarUpdate(true, ele, false);
1177
+ var focusedCell = ele.querySelector('.e-focused-date');
1178
+ if (isNullOrUndefined(focusedCell)) {
1179
+ this.currentDate = this.firstCellToFocus(this.leftCalendar);
1180
+ }
1181
+ this.keyboardNavigate(0, view, e, max, min);
1182
+ this.keyNavigation(ele, e);
1183
+ }
1184
+ break;
1160
1185
  }
1161
1186
  };
1187
+ DateRangePicker.prototype.firstCellToFocus = function (calendar) {
1188
+ var focusAbleEle = calendar.children[1].firstElementChild.querySelector('td.e-cell:not(.e-week-number):not(.e-disabled):not(.e-other-month)');
1189
+ var focusEleID = focusAbleEle && focusAbleEle.id ? focusAbleEle.id.split('_')[0] : null;
1190
+ var currentFirstDay = new Date(this.currentDate.getFullYear(), this.currentDate.getMonth(), 1);
1191
+ var focusDate = focusEleID ? new Date(+focusEleID) : currentFirstDay;
1192
+ return focusDate;
1193
+ };
1162
1194
  DateRangePicker.prototype.keyInputHandler = function (e, value) {
1163
1195
  var date;
1164
1196
  var view = this.getViewNumber(this.currentView());
@@ -1349,19 +1381,39 @@ var DateRangePicker = /** @class */ (function (_super) {
1349
1381
  this.presetElement.focus();
1350
1382
  this.removeFocusedDate();
1351
1383
  }
1352
- e.preventDefault();
1384
+ if (isLeftCalendar) {
1385
+ e.preventDefault();
1386
+ }
1387
+ if (this.tabKeyValidation(ele, RIGHTCALENDER)) {
1388
+ this.currentDate = new Date(+this.leftCalCurrentDate);
1389
+ this.navInCalendar(e, isLeftCalendar, leftDateLimit, rightDateLimit, ele);
1390
+ }
1353
1391
  break;
1354
1392
  case 'spacebar':
1355
1393
  if (this.applyButton && !this.applyButton.disabled) {
1356
1394
  this.applyFunction(e);
1357
1395
  }
1358
1396
  break;
1397
+ case 'tab':
1398
+ if (this.tabKeyValidation(ele, LEFTCALENDER)) {
1399
+ this.currentDate = new Date(+this.rightCalCurrentDate);
1400
+ this.navInCalendar(e, isLeftCalendar, leftDateLimit, rightDateLimit, ele);
1401
+ }
1402
+ break;
1359
1403
  default:
1360
1404
  this.navInCalendar(e, isLeftCalendar, leftDateLimit, rightDateLimit, ele);
1361
1405
  this.checkMinMaxDays();
1362
1406
  }
1363
1407
  this.presetHeight();
1364
1408
  };
1409
+ DateRangePicker.prototype.tabKeyValidation = function (ele, calendarPos) {
1410
+ var isLeftCalendar = ele.classList.contains(calendarPos);
1411
+ var rightHeader = this.rightCalendar.querySelector('.e-header');
1412
+ var leftHeader = this.leftCalendar.querySelector('.e-header');
1413
+ var isRightMonth = rightHeader ? rightHeader.classList.contains('e-month') : false;
1414
+ var isLeftMonth = leftHeader ? leftHeader.classList.contains('e-month') : false;
1415
+ return isLeftCalendar && isLeftMonth && isRightMonth && !this.isMobile;
1416
+ };
1365
1417
  DateRangePicker.prototype.keyNavigation = function (calendar, e) {
1366
1418
  this.bindCalendarCellEvents(calendar);
1367
1419
  if (calendar.classList.contains(LEFTCALENDER)) {
@@ -2103,9 +2155,10 @@ var DateRangePicker = /** @class */ (function (_super) {
2103
2155
  }
2104
2156
  this.removeFocusedDate();
2105
2157
  };
2106
- DateRangePicker.prototype.updateControl = function (calendar) {
2158
+ DateRangePicker.prototype.updateControl = function (calendar, customDate) {
2159
+ if (customDate === void 0) { customDate = null; }
2107
2160
  if (calendar.classList.contains(RIGHTCALENDER)) {
2108
- this.rightCalCurrentDate = new Date(+this.currentDate);
2161
+ this.rightCalCurrentDate = new Date(+(customDate ? customDate : this.currentDate));
2109
2162
  }
2110
2163
  else {
2111
2164
  this.leftCalCurrentDate = new Date(+this.currentDate);
@@ -2433,7 +2486,7 @@ var DateRangePicker = /** @class */ (function (_super) {
2433
2486
  this.rightCalNextIcon = this.calendarElement.querySelector('.' + RIGHTCALENDER + ' .' + NEXTICON);
2434
2487
  this.rightTitle = this.calendarElement.querySelector('.' + RIGHTCALENDER + ' .' + TITLE);
2435
2488
  remove(this.calendarElement.querySelector('.' + RIGHTCALENDER + ' .' + ICONCONTAINER));
2436
- this.calendarElement.querySelector('table').setAttribute('tabindex', '-1');
2489
+ this.calendarElement.querySelector('table').setAttribute('tabindex', '0');
2437
2490
  this.calendarElement.querySelector('.' + RIGHTCALENDER + ' .' + HEADER).appendChild(this.rightCalNextIcon);
2438
2491
  this.calendarElement.querySelector('.' + RIGHTCALENDER + ' .' + HEADER).appendChild(this.rightCalPrevIcon);
2439
2492
  prepend([this.rightCalPrevIcon], this.calendarElement.querySelector('.' + RIGHTCALENDER + ' .' + HEADER));
@@ -2547,7 +2600,8 @@ var DateRangePicker = /** @class */ (function (_super) {
2547
2600
  this.updateControl(this.leftCalendar);
2548
2601
  this.updateCalendarElement(this.rightCalendar);
2549
2602
  _super.prototype.navigateTo.call(this, view, this.rightCalCurrentDate);
2550
- this.updateControl(this.rightCalendar);
2603
+ var customDate = this.rightCalCurrentDate ? this.rightCalCurrentDate : this.currentDate;
2604
+ this.updateControl(this.rightCalendar, customDate);
2551
2605
  this.updateNavIcons();
2552
2606
  this.calendarIconEvent();
2553
2607
  this.calendarIconRipple();
@@ -21,4 +21,5 @@ export interface IMaskedDateTime extends Component<HTMLElement> {
21
21
  cldrTimeFormat(): string;
22
22
  calendarMode: CalendarType;
23
23
  globalize: Internationalization;
24
+ isFocused: boolean;
24
25
  }
@@ -26,6 +26,7 @@ export declare class MaskedDateTime {
26
26
  private isComplete;
27
27
  private previousDate;
28
28
  private isNavigate;
29
+ private navigated;
29
30
  private formatRegex;
30
31
  private isDeletion;
31
32
  private isShortYear;
@@ -48,6 +49,7 @@ export declare class MaskedDateTime {
48
49
  private setDynamicValue;
49
50
  private setSelection;
50
51
  private maskKeydownHandler;
52
+ private isPersist;
51
53
  private differenceCheck;
52
54
  private formatCheck;
53
55
  private maskInputHandler;
@@ -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,7 +210,9 @@ 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);
214
+ this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
215
+ this.navigated = this.navigated ? false : this.navigated;
208
216
  this.isDateZero = (newVal[start - 1] == '0');
209
217
  if (isNaN(date)) {
210
218
  return;
@@ -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]);