@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
|
@@ -222,6 +222,10 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
222
222
|
duration: 400,
|
|
223
223
|
isCenterRipple: true
|
|
224
224
|
});
|
|
225
|
+
if (this.getModuleName() === 'daterangepicker') {
|
|
226
|
+
attributes(this.previousIcon, { tabIndex: '-1' });
|
|
227
|
+
attributes(this.nextIcon, { tabIndex: '-1' });
|
|
228
|
+
}
|
|
225
229
|
attributes(this.nextIcon, ariaNextAttrs);
|
|
226
230
|
this.headerTitleElement = this.createElement('div', { className: '' + LINK + ' ' + TITLE });
|
|
227
231
|
attributes(this.headerTitleElement, ariaTitleAttrs);
|
|
@@ -3047,6 +3051,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3047
3051
|
this.isIconClicked = false;
|
|
3048
3052
|
this.isDynamicValueChanged = false;
|
|
3049
3053
|
this.moduleName = this.getModuleName();
|
|
3054
|
+
this.isFocused = false;
|
|
3050
3055
|
this.datepickerOptions = options;
|
|
3051
3056
|
}
|
|
3052
3057
|
/**
|
|
@@ -3608,6 +3613,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3608
3613
|
}
|
|
3609
3614
|
}
|
|
3610
3615
|
inputFocusHandler() {
|
|
3616
|
+
this.isFocused = true;
|
|
3611
3617
|
if (!this.enabled) {
|
|
3612
3618
|
return;
|
|
3613
3619
|
}
|
|
@@ -5214,7 +5220,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5214
5220
|
this.validationAttribute(this.element, this.inputElement);
|
|
5215
5221
|
}
|
|
5216
5222
|
this.checkHtmlAttributes(false);
|
|
5217
|
-
merge(this.defaultKeyConfigs, { shiftTab: 'shift+tab' });
|
|
5223
|
+
merge(this.defaultKeyConfigs, { shiftTab: 'shift+tab', tab: 'tab' });
|
|
5218
5224
|
const start = this.checkDateValue(new Date(this.checkValue(this.startValue)));
|
|
5219
5225
|
this.setProperties({ startDate: start }, true); // persist the value propeerty.
|
|
5220
5226
|
this.setProperties({ endValue: this.checkDateValue(new Date(this.checkValue(this.endValue))) }, true);
|
|
@@ -5920,8 +5926,10 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5920
5926
|
}
|
|
5921
5927
|
}
|
|
5922
5928
|
}
|
|
5923
|
-
keyCalendarUpdate(isLeftCalendar, ele) {
|
|
5924
|
-
|
|
5929
|
+
keyCalendarUpdate(isLeftCalendar, ele, isRemoveFocus = true) {
|
|
5930
|
+
if (isRemoveFocus) {
|
|
5931
|
+
this.removeFocusedDate();
|
|
5932
|
+
}
|
|
5925
5933
|
if (isLeftCalendar) {
|
|
5926
5934
|
this.leftCalCurrentDate = new Date(+this.currentDate);
|
|
5927
5935
|
ele = this.leftCalendar;
|
|
@@ -6022,8 +6030,37 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6022
6030
|
}
|
|
6023
6031
|
this.keyNavigation(ele, e);
|
|
6024
6032
|
break;
|
|
6033
|
+
case 'tab':
|
|
6034
|
+
if (this.tabKeyValidation(ele, LEFTCALENDER)) {
|
|
6035
|
+
ele = this.keyCalendarUpdate(false, ele, false);
|
|
6036
|
+
const focusedCell = ele.querySelector('.e-focused-date');
|
|
6037
|
+
if (isNullOrUndefined(focusedCell)) {
|
|
6038
|
+
this.currentDate = this.firstCellToFocus(this.rightCalendar);
|
|
6039
|
+
}
|
|
6040
|
+
this.keyboardNavigate(0, view, e, max, min);
|
|
6041
|
+
this.keyNavigation(ele, e);
|
|
6042
|
+
}
|
|
6043
|
+
break;
|
|
6044
|
+
case 'shiftTab':
|
|
6045
|
+
if (this.tabKeyValidation(ele, RIGHTCALENDER)) {
|
|
6046
|
+
ele = this.keyCalendarUpdate(true, ele, false);
|
|
6047
|
+
const focusedCell = ele.querySelector('.e-focused-date');
|
|
6048
|
+
if (isNullOrUndefined(focusedCell)) {
|
|
6049
|
+
this.currentDate = this.firstCellToFocus(this.leftCalendar);
|
|
6050
|
+
}
|
|
6051
|
+
this.keyboardNavigate(0, view, e, max, min);
|
|
6052
|
+
this.keyNavigation(ele, e);
|
|
6053
|
+
}
|
|
6054
|
+
break;
|
|
6025
6055
|
}
|
|
6026
6056
|
}
|
|
6057
|
+
firstCellToFocus(calendar) {
|
|
6058
|
+
const focusAbleEle = calendar.children[1].firstElementChild.querySelector('td.e-cell:not(.e-week-number):not(.e-disabled):not(.e-other-month)');
|
|
6059
|
+
const focusEleID = focusAbleEle && focusAbleEle.id ? focusAbleEle.id.split('_')[0] : null;
|
|
6060
|
+
const currentFirstDay = new Date(this.currentDate.getFullYear(), this.currentDate.getMonth(), 1);
|
|
6061
|
+
const focusDate = focusEleID ? new Date(+focusEleID) : currentFirstDay;
|
|
6062
|
+
return focusDate;
|
|
6063
|
+
}
|
|
6027
6064
|
keyInputHandler(e, value) {
|
|
6028
6065
|
let date;
|
|
6029
6066
|
let view = this.getViewNumber(this.currentView());
|
|
@@ -6214,19 +6251,39 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6214
6251
|
this.presetElement.focus();
|
|
6215
6252
|
this.removeFocusedDate();
|
|
6216
6253
|
}
|
|
6217
|
-
|
|
6254
|
+
if (isLeftCalendar) {
|
|
6255
|
+
e.preventDefault();
|
|
6256
|
+
}
|
|
6257
|
+
if (this.tabKeyValidation(ele, RIGHTCALENDER)) {
|
|
6258
|
+
this.currentDate = new Date(+this.leftCalCurrentDate);
|
|
6259
|
+
this.navInCalendar(e, isLeftCalendar, leftDateLimit, rightDateLimit, ele);
|
|
6260
|
+
}
|
|
6218
6261
|
break;
|
|
6219
6262
|
case 'spacebar':
|
|
6220
6263
|
if (this.applyButton && !this.applyButton.disabled) {
|
|
6221
6264
|
this.applyFunction(e);
|
|
6222
6265
|
}
|
|
6223
6266
|
break;
|
|
6267
|
+
case 'tab':
|
|
6268
|
+
if (this.tabKeyValidation(ele, LEFTCALENDER)) {
|
|
6269
|
+
this.currentDate = new Date(+this.rightCalCurrentDate);
|
|
6270
|
+
this.navInCalendar(e, isLeftCalendar, leftDateLimit, rightDateLimit, ele);
|
|
6271
|
+
}
|
|
6272
|
+
break;
|
|
6224
6273
|
default:
|
|
6225
6274
|
this.navInCalendar(e, isLeftCalendar, leftDateLimit, rightDateLimit, ele);
|
|
6226
6275
|
this.checkMinMaxDays();
|
|
6227
6276
|
}
|
|
6228
6277
|
this.presetHeight();
|
|
6229
6278
|
}
|
|
6279
|
+
tabKeyValidation(ele, calendarPos) {
|
|
6280
|
+
const isLeftCalendar = ele.classList.contains(calendarPos);
|
|
6281
|
+
const rightHeader = this.rightCalendar.querySelector('.e-header');
|
|
6282
|
+
const leftHeader = this.leftCalendar.querySelector('.e-header');
|
|
6283
|
+
const isRightMonth = rightHeader ? rightHeader.classList.contains('e-month') : false;
|
|
6284
|
+
const isLeftMonth = leftHeader ? leftHeader.classList.contains('e-month') : false;
|
|
6285
|
+
return isLeftCalendar && isLeftMonth && isRightMonth && !this.isMobile;
|
|
6286
|
+
}
|
|
6230
6287
|
keyNavigation(calendar, e) {
|
|
6231
6288
|
this.bindCalendarCellEvents(calendar);
|
|
6232
6289
|
if (calendar.classList.contains(LEFTCALENDER)) {
|
|
@@ -6955,9 +7012,9 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6955
7012
|
}
|
|
6956
7013
|
this.removeFocusedDate();
|
|
6957
7014
|
}
|
|
6958
|
-
updateControl(calendar) {
|
|
7015
|
+
updateControl(calendar, customDate = null) {
|
|
6959
7016
|
if (calendar.classList.contains(RIGHTCALENDER)) {
|
|
6960
|
-
this.rightCalCurrentDate = new Date(+this.currentDate);
|
|
7017
|
+
this.rightCalCurrentDate = new Date(+(customDate ? customDate : this.currentDate));
|
|
6961
7018
|
}
|
|
6962
7019
|
else {
|
|
6963
7020
|
this.leftCalCurrentDate = new Date(+this.currentDate);
|
|
@@ -7285,7 +7342,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
7285
7342
|
this.rightCalNextIcon = this.calendarElement.querySelector('.' + RIGHTCALENDER + ' .' + NEXTICON$1);
|
|
7286
7343
|
this.rightTitle = this.calendarElement.querySelector('.' + RIGHTCALENDER + ' .' + TITLE$1);
|
|
7287
7344
|
remove(this.calendarElement.querySelector('.' + RIGHTCALENDER + ' .' + ICONCONTAINER$1));
|
|
7288
|
-
this.calendarElement.querySelector('table').setAttribute('tabindex', '
|
|
7345
|
+
this.calendarElement.querySelector('table').setAttribute('tabindex', '0');
|
|
7289
7346
|
this.calendarElement.querySelector('.' + RIGHTCALENDER + ' .' + HEADER$1).appendChild(this.rightCalNextIcon);
|
|
7290
7347
|
this.calendarElement.querySelector('.' + RIGHTCALENDER + ' .' + HEADER$1).appendChild(this.rightCalPrevIcon);
|
|
7291
7348
|
prepend([this.rightCalPrevIcon], this.calendarElement.querySelector('.' + RIGHTCALENDER + ' .' + HEADER$1));
|
|
@@ -7399,7 +7456,8 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
7399
7456
|
this.updateControl(this.leftCalendar);
|
|
7400
7457
|
this.updateCalendarElement(this.rightCalendar);
|
|
7401
7458
|
super.navigateTo.call(this, view, this.rightCalCurrentDate);
|
|
7402
|
-
this.
|
|
7459
|
+
const customDate = this.rightCalCurrentDate ? this.rightCalCurrentDate : this.currentDate;
|
|
7460
|
+
this.updateControl(this.rightCalendar, customDate);
|
|
7403
7461
|
this.updateNavIcons();
|
|
7404
7462
|
this.calendarIconEvent();
|
|
7405
7463
|
this.calendarIconRipple();
|
|
@@ -13291,6 +13349,7 @@ class MaskedDateTime {
|
|
|
13291
13349
|
this.isHiddenMask = false;
|
|
13292
13350
|
this.isComplete = false;
|
|
13293
13351
|
this.isNavigate = false;
|
|
13352
|
+
this.navigated = false;
|
|
13294
13353
|
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;
|
|
13295
13354
|
this.isDeletion = false;
|
|
13296
13355
|
this.isShortYear = false;
|
|
@@ -13410,6 +13469,7 @@ class MaskedDateTime {
|
|
|
13410
13469
|
this.parent.inputElement.setSelectionRange(start, end);
|
|
13411
13470
|
}
|
|
13412
13471
|
maskKeydownHandler(args) {
|
|
13472
|
+
this.dayTypeCount = this.monthTypeCount = this.hourTypeCount = this.minuteTypeCount = this.secondTypeCount = 0;
|
|
13413
13473
|
if (args.e.key === 'Delete') {
|
|
13414
13474
|
this.isDeleteKey = true;
|
|
13415
13475
|
return;
|
|
@@ -13443,6 +13503,10 @@ class MaskedDateTime {
|
|
|
13443
13503
|
this.validCharacterCheck();
|
|
13444
13504
|
}
|
|
13445
13505
|
}
|
|
13506
|
+
isPersist() {
|
|
13507
|
+
let isPersist = this.parent.isFocused || this.navigated;
|
|
13508
|
+
return isPersist;
|
|
13509
|
+
}
|
|
13446
13510
|
differenceCheck() {
|
|
13447
13511
|
let start = this.parent.inputElement.selectionStart;
|
|
13448
13512
|
let inputValue = this.parent.inputElement.value;
|
|
@@ -13462,8 +13526,10 @@ class MaskedDateTime {
|
|
|
13462
13526
|
}
|
|
13463
13527
|
switch (this.previousHiddenMask[start - 1]) {
|
|
13464
13528
|
case 'd':
|
|
13465
|
-
let date = (this.isDayPart && newDateValue.getDate().toString().length < 2 ? newDateValue.getDate() * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
13529
|
+
let date = (this.isDayPart && newDateValue.getDate().toString().length < 2 && !this.isPersist() ? newDateValue.getDate() * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
13466
13530
|
this.isDateZero = (newVal[start - 1] == '0');
|
|
13531
|
+
this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
|
|
13532
|
+
this.navigated = this.navigated ? false : this.navigated;
|
|
13467
13533
|
if (isNaN(date)) {
|
|
13468
13534
|
return;
|
|
13469
13535
|
}
|
|
@@ -13487,12 +13553,14 @@ class MaskedDateTime {
|
|
|
13487
13553
|
break;
|
|
13488
13554
|
case 'M':
|
|
13489
13555
|
let month;
|
|
13490
|
-
if (newDateValue.getMonth().toString().length < 2) {
|
|
13556
|
+
if (newDateValue.getMonth().toString().length < 2 && !this.isPersist()) {
|
|
13491
13557
|
month = (this.isMonthPart ? (newDateValue.getMonth() + 1) * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
13492
13558
|
}
|
|
13493
13559
|
else {
|
|
13494
13560
|
month = parseInt(newVal[start - 1], 10);
|
|
13495
13561
|
}
|
|
13562
|
+
this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
|
|
13563
|
+
this.navigated = this.navigated ? false : this.navigated;
|
|
13496
13564
|
this.isMonthZero = (newVal[start - 1] == '0');
|
|
13497
13565
|
if (!isNaN(month)) {
|
|
13498
13566
|
while (month > 12) {
|
|
@@ -13564,7 +13632,9 @@ class MaskedDateTime {
|
|
|
13564
13632
|
}
|
|
13565
13633
|
break;
|
|
13566
13634
|
case 'h':
|
|
13567
|
-
this.hour = (this.isHourPart && (newDateValue.getHours() % 12 || 12).toString().length < 2 ? (newDateValue.getHours() % 12 || 12) * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
13635
|
+
this.hour = (this.isHourPart && (newDateValue.getHours() % 12 || 12).toString().length < 2 && !this.isPersist() ? (newDateValue.getHours() % 12 || 12) * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
13636
|
+
this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
|
|
13637
|
+
this.navigated = this.navigated ? false : this.navigated;
|
|
13568
13638
|
if (isNaN(this.hour)) {
|
|
13569
13639
|
return;
|
|
13570
13640
|
}
|
|
@@ -13577,7 +13647,9 @@ class MaskedDateTime {
|
|
|
13577
13647
|
this.hourTypeCount = this.hourTypeCount + 1;
|
|
13578
13648
|
break;
|
|
13579
13649
|
case 'H':
|
|
13580
|
-
this.hour = (this.isHourPart && newDateValue.getHours().toString().length < 2 ? newDateValue.getHours() * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
13650
|
+
this.hour = (this.isHourPart && newDateValue.getHours().toString().length < 2 && !this.isPersist() ? newDateValue.getHours() * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
13651
|
+
this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
|
|
13652
|
+
this.navigated = this.navigated ? false : this.navigated;
|
|
13581
13653
|
if (isNaN(this.hour)) {
|
|
13582
13654
|
return;
|
|
13583
13655
|
}
|
|
@@ -13590,7 +13662,9 @@ class MaskedDateTime {
|
|
|
13590
13662
|
this.hourTypeCount = this.hourTypeCount + 1;
|
|
13591
13663
|
break;
|
|
13592
13664
|
case 'm':
|
|
13593
|
-
let minutes = (this.isMinutePart && newDateValue.getMinutes().toString().length < 2 ? newDateValue.getMinutes() * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
13665
|
+
let minutes = (this.isMinutePart && newDateValue.getMinutes().toString().length < 2 && !this.isPersist() ? newDateValue.getMinutes() * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
13666
|
+
this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
|
|
13667
|
+
this.navigated = this.navigated ? false : this.navigated;
|
|
13594
13668
|
if (isNaN(minutes)) {
|
|
13595
13669
|
return;
|
|
13596
13670
|
}
|
|
@@ -13603,7 +13677,9 @@ class MaskedDateTime {
|
|
|
13603
13677
|
this.minuteTypeCount = this.minuteTypeCount + 1;
|
|
13604
13678
|
break;
|
|
13605
13679
|
case 's':
|
|
13606
|
-
let seconds = (this.isSecondsPart && newDateValue.getSeconds().toString().length < 2 ? newDateValue.getSeconds() * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
13680
|
+
let seconds = (this.isSecondsPart && newDateValue.getSeconds().toString().length < 2 && !this.isPersist() ? newDateValue.getSeconds() * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
13681
|
+
this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
|
|
13682
|
+
this.navigated = this.navigated ? false : this.navigated;
|
|
13607
13683
|
if (isNaN(seconds)) {
|
|
13608
13684
|
return;
|
|
13609
13685
|
}
|
|
@@ -13657,6 +13733,10 @@ class MaskedDateTime {
|
|
|
13657
13733
|
case 'd':
|
|
13658
13734
|
result = proxy.isDayPart ? proxy.maskDateValue.getDate().toString() : proxy.defaultConstant['day'].toString();
|
|
13659
13735
|
result = proxy.zeroCheck(proxy.isDateZero, proxy.isDayPart, result);
|
|
13736
|
+
if (proxy.dayTypeCount == 2) {
|
|
13737
|
+
proxy.isNavigate = true;
|
|
13738
|
+
proxy.dayTypeCount = 0;
|
|
13739
|
+
}
|
|
13660
13740
|
break;
|
|
13661
13741
|
case 'dd':
|
|
13662
13742
|
result = proxy.isDayPart ? proxy.roundOff(proxy.maskDateValue.getDate(), 2) : proxy.defaultConstant['day'].toString();
|
|
@@ -13680,6 +13760,10 @@ class MaskedDateTime {
|
|
|
13680
13760
|
case 'M':
|
|
13681
13761
|
result = proxy.isMonthPart ? (proxy.maskDateValue.getMonth() + 1).toString() : proxy.defaultConstant['month'].toString();
|
|
13682
13762
|
result = proxy.zeroCheck(proxy.isMonthZero, proxy.isMonthPart, result);
|
|
13763
|
+
if (proxy.monthTypeCount == 2) {
|
|
13764
|
+
proxy.isNavigate = true;
|
|
13765
|
+
proxy.monthTypeCount = 0;
|
|
13766
|
+
}
|
|
13683
13767
|
break;
|
|
13684
13768
|
case 'MM':
|
|
13685
13769
|
result = proxy.isMonthPart ? proxy.roundOff(proxy.maskDateValue.getMonth() + 1, 2) : proxy.defaultConstant['month'].toString();
|
|
@@ -13709,6 +13793,10 @@ class MaskedDateTime {
|
|
|
13709
13793
|
break;
|
|
13710
13794
|
case 'h':
|
|
13711
13795
|
result = proxy.isHourPart ? (proxy.maskDateValue.getHours() % 12 || 12).toString() : proxy.defaultConstant['hour'].toString();
|
|
13796
|
+
if (proxy.hourTypeCount == 2) {
|
|
13797
|
+
proxy.isNavigate = true;
|
|
13798
|
+
proxy.hourTypeCount = 0;
|
|
13799
|
+
}
|
|
13712
13800
|
break;
|
|
13713
13801
|
case 'hh':
|
|
13714
13802
|
result = proxy.isHourPart ? proxy.roundOff(proxy.maskDateValue.getHours() % 12 || 12, 2) : proxy.defaultConstant['hour'].toString();
|
|
@@ -13719,6 +13807,10 @@ class MaskedDateTime {
|
|
|
13719
13807
|
break;
|
|
13720
13808
|
case 'H':
|
|
13721
13809
|
result = proxy.isHourPart ? proxy.maskDateValue.getHours().toString() : proxy.defaultConstant['hour'].toString();
|
|
13810
|
+
if (proxy.hourTypeCount == 2) {
|
|
13811
|
+
proxy.isNavigate = true;
|
|
13812
|
+
proxy.hourTypeCount = 0;
|
|
13813
|
+
}
|
|
13722
13814
|
break;
|
|
13723
13815
|
case 'HH':
|
|
13724
13816
|
result = proxy.isHourPart ? proxy.roundOff(proxy.maskDateValue.getHours(), 2) : proxy.defaultConstant['hour'].toString();
|
|
@@ -13729,6 +13821,10 @@ class MaskedDateTime {
|
|
|
13729
13821
|
break;
|
|
13730
13822
|
case 'm':
|
|
13731
13823
|
result = proxy.isMinutePart ? proxy.maskDateValue.getMinutes().toString() : proxy.defaultConstant['minute'].toString();
|
|
13824
|
+
if (proxy.minuteTypeCount == 2) {
|
|
13825
|
+
proxy.isNavigate = true;
|
|
13826
|
+
proxy.minuteTypeCount = 0;
|
|
13827
|
+
}
|
|
13732
13828
|
break;
|
|
13733
13829
|
case 'mm':
|
|
13734
13830
|
result = proxy.isMinutePart ? proxy.roundOff(proxy.maskDateValue.getMinutes(), 2) : proxy.defaultConstant['minute'].toString();
|
|
@@ -13739,6 +13835,10 @@ class MaskedDateTime {
|
|
|
13739
13835
|
break;
|
|
13740
13836
|
case 's':
|
|
13741
13837
|
result = proxy.isSecondsPart ? proxy.maskDateValue.getSeconds().toString() : proxy.defaultConstant['second'].toString();
|
|
13838
|
+
if (proxy.secondTypeCount == 2) {
|
|
13839
|
+
proxy.isNavigate = true;
|
|
13840
|
+
proxy.secondTypeCount = 0;
|
|
13841
|
+
}
|
|
13742
13842
|
break;
|
|
13743
13843
|
case 'ss':
|
|
13744
13844
|
result = proxy.isSecondsPart ? proxy.roundOff(proxy.maskDateValue.getSeconds(), 2) : proxy.defaultConstant['second'].toString();
|
|
@@ -13817,6 +13917,7 @@ class MaskedDateTime {
|
|
|
13817
13917
|
let start = this.parent.inputElement.selectionStart;
|
|
13818
13918
|
let end = this.parent.inputElement.selectionEnd;
|
|
13819
13919
|
let formatIndex = isbackward ? start - 1 : end + 1;
|
|
13920
|
+
this.navigated = true;
|
|
13820
13921
|
while (formatIndex < this.hiddenMask.length && formatIndex >= 0) {
|
|
13821
13922
|
if (this.validCharacters.indexOf(this.hiddenMask[formatIndex]) >= 0) {
|
|
13822
13923
|
this.setSelection(this.hiddenMask[formatIndex]);
|