@syncfusion/ej2-calendars 20.2.46 → 20.3.47
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.min.js +10 -0
- 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 +141 -59
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +141 -59
- 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/calendar/calendar.d.ts +3 -2
- package/src/calendar/calendar.js +37 -12
- package/src/calendar/islamic.js +4 -4
- package/src/datepicker/datepicker.js +22 -9
- package/src/daterangepicker/daterangepicker.d.ts +1 -0
- package/src/daterangepicker/daterangepicker.js +34 -14
- package/src/datetimepicker/datetimepicker.js +18 -8
- package/src/timepicker/timepicker.js +26 -12
- package/styles/bootstrap-dark.css +21 -2
- package/styles/bootstrap.css +21 -2
- package/styles/bootstrap4.css +21 -2
- package/styles/bootstrap5-dark.css +26 -4
- package/styles/bootstrap5.css +26 -4
- package/styles/calendar/_all.scss +1 -1
- package/styles/calendar/_bootstrap-dark-definition.scss +8 -7
- package/styles/calendar/_bootstrap-definition.scss +6 -6
- package/styles/calendar/_bootstrap4-definition.scss +6 -5
- package/styles/calendar/_bootstrap5-definition.scss +29 -3
- package/styles/calendar/_fabric-dark-definition.scss +4 -1
- package/styles/calendar/_fabric-definition.scss +1 -0
- package/styles/calendar/_fluent-definition.scss +30 -4
- package/styles/calendar/_fusionnew-definition.scss +29 -3
- package/styles/calendar/_highcontrast-light-definition.scss +3 -1
- package/styles/calendar/_layout.scss +153 -95
- package/styles/calendar/_material-dark-definition.scss +3 -1
- package/styles/calendar/_material3-definition.scss +29 -3
- package/styles/calendar/_tailwind-definition.scss +27 -5
- package/styles/calendar/_theme.scss +111 -66
- package/styles/calendar/bootstrap-dark.css +1 -0
- package/styles/calendar/bootstrap.css +1 -0
- package/styles/calendar/bootstrap4.css +1 -0
- package/styles/calendar/bootstrap5-dark.css +1 -0
- package/styles/calendar/bootstrap5.css +1 -0
- package/styles/calendar/fabric-dark.css +1 -0
- package/styles/calendar/fabric.css +1 -0
- package/styles/calendar/fluent-dark.css +1 -0
- package/styles/calendar/fluent.css +1 -0
- package/styles/calendar/highcontrast-light.css +1 -0
- package/styles/calendar/highcontrast.css +1 -0
- package/styles/calendar/icons/_bootstrap-dark.scss +2 -1
- package/styles/calendar/icons/_bootstrap.scss +2 -1
- package/styles/calendar/icons/_bootstrap4.scss +2 -1
- package/styles/calendar/icons/_bootstrap5.scss +2 -1
- package/styles/calendar/icons/_fabric-dark.scss +2 -1
- package/styles/calendar/icons/_fabric.scss +2 -1
- package/styles/calendar/icons/_fluent.scss +2 -1
- package/styles/calendar/icons/_fusionnew.scss +2 -1
- package/styles/calendar/icons/_highcontrast-light.scss +2 -1
- package/styles/calendar/icons/_highcontrast.scss +2 -1
- package/styles/calendar/icons/_material-dark.scss +2 -1
- package/styles/calendar/icons/_material.scss +2 -1
- package/styles/calendar/icons/_material3.scss +2 -1
- package/styles/calendar/icons/_tailwind.scss +2 -1
- package/styles/calendar/material-dark.css +1 -0
- package/styles/calendar/material.css +1 -0
- package/styles/calendar/tailwind-dark.css +2 -0
- package/styles/calendar/tailwind.css +2 -0
- package/styles/datepicker/_all.scss +1 -1
- package/styles/datepicker/_bootstrap-dark-definition.scss +4 -1
- package/styles/datepicker/_bootstrap-definition.scss +2 -0
- package/styles/datepicker/_bootstrap4-definition.scss +2 -0
- package/styles/datepicker/_bootstrap5-definition.scss +5 -1
- package/styles/datepicker/_fabric-dark-definition.scss +3 -0
- package/styles/datepicker/_fabric-definition.scss +2 -0
- package/styles/datepicker/_fluent-definition.scss +4 -1
- package/styles/datepicker/_fusionnew-definition.scss +5 -1
- package/styles/datepicker/_highcontrast-definition.scss +2 -0
- package/styles/datepicker/_highcontrast-light-definition.scss +4 -1
- package/styles/datepicker/_layout.scss +134 -6
- package/styles/datepicker/_material-dark-definition.scss +4 -1
- package/styles/datepicker/_material-definition.scss +2 -0
- package/styles/datepicker/_material3-definition.scss +5 -1
- package/styles/datepicker/_tailwind-definition.scss +5 -1
- package/styles/datepicker/_theme.scss +7 -7
- package/styles/datepicker/bootstrap-dark.css +3 -1
- package/styles/datepicker/bootstrap.css +3 -1
- package/styles/datepicker/bootstrap4.css +3 -1
- package/styles/datepicker/bootstrap5-dark.css +4 -2
- package/styles/datepicker/bootstrap5.css +4 -2
- package/styles/datepicker/fabric-dark.css +3 -1
- package/styles/datepicker/fabric.css +3 -1
- package/styles/datepicker/fluent-dark.css +4 -2
- package/styles/datepicker/fluent.css +4 -2
- package/styles/datepicker/highcontrast-light.css +3 -1
- package/styles/datepicker/highcontrast.css +3 -1
- package/styles/datepicker/icons/_bootstrap-dark.scss +7 -6
- package/styles/datepicker/icons/_bootstrap.scss +7 -6
- package/styles/datepicker/icons/_bootstrap4.scss +7 -6
- package/styles/datepicker/icons/_bootstrap5.scss +7 -6
- package/styles/datepicker/icons/_fabric-dark.scss +6 -5
- package/styles/datepicker/icons/_fabric.scss +7 -6
- package/styles/datepicker/icons/_fluent.scss +7 -6
- package/styles/datepicker/icons/_fusionnew.scss +7 -6
- package/styles/datepicker/icons/_highcontrast-light.scss +7 -6
- package/styles/datepicker/icons/_highcontrast.scss +7 -7
- package/styles/datepicker/icons/_material-dark.scss +7 -6
- package/styles/datepicker/icons/_material.scss +7 -6
- package/styles/datepicker/icons/_material3.scss +7 -6
- package/styles/datepicker/icons/_tailwind.scss +7 -6
- package/styles/datepicker/material-dark.css +3 -1
- package/styles/datepicker/material.css +85 -0
- package/styles/datepicker/tailwind-dark.css +4 -2
- package/styles/datepicker/tailwind.css +4 -2
- package/styles/daterangepicker/_all.scss +1 -1
- package/styles/daterangepicker/_bootstrap-dark-definition.scss +4 -0
- package/styles/daterangepicker/_bootstrap-definition.scss +5 -1
- package/styles/daterangepicker/_bootstrap4-definition.scss +4 -0
- package/styles/daterangepicker/_bootstrap5-definition.scss +7 -0
- package/styles/daterangepicker/_fabric-dark-definition.scss +7 -2
- package/styles/daterangepicker/_fabric-definition.scss +5 -1
- package/styles/daterangepicker/_fluent-definition.scss +6 -1
- package/styles/daterangepicker/_fusionnew-definition.scss +6 -0
- package/styles/daterangepicker/_highcontrast-definition.scss +6 -2
- package/styles/daterangepicker/_highcontrast-light-definition.scss +8 -3
- package/styles/daterangepicker/_layout.scss +280 -56
- package/styles/daterangepicker/_material-dark-definition.scss +7 -2
- package/styles/daterangepicker/_material-definition.scss +6 -1
- package/styles/daterangepicker/_material3-definition.scss +6 -0
- package/styles/daterangepicker/_tailwind-definition.scss +5 -0
- package/styles/daterangepicker/_theme.scss +55 -27
- package/styles/daterangepicker/bootstrap-dark.css +11 -1
- package/styles/daterangepicker/bootstrap.css +11 -1
- package/styles/daterangepicker/bootstrap4.css +11 -1
- package/styles/daterangepicker/bootstrap5-dark.css +13 -2
- package/styles/daterangepicker/bootstrap5.css +13 -2
- package/styles/daterangepicker/fabric-dark.css +11 -1
- package/styles/daterangepicker/fabric.css +11 -1
- package/styles/daterangepicker/fluent-dark.css +12 -2
- package/styles/daterangepicker/fluent.css +12 -2
- package/styles/daterangepicker/highcontrast-light.css +11 -1
- package/styles/daterangepicker/highcontrast.css +11 -1
- package/styles/daterangepicker/icons/_bootstrap-dark.scss +13 -8
- package/styles/daterangepicker/icons/_bootstrap.scss +13 -8
- package/styles/daterangepicker/icons/_bootstrap4.scss +13 -8
- package/styles/daterangepicker/icons/_bootstrap5.scss +13 -8
- package/styles/daterangepicker/icons/_fabric-dark.scss +13 -8
- package/styles/daterangepicker/icons/_fabric.scss +13 -8
- package/styles/daterangepicker/icons/_fluent.scss +13 -8
- package/styles/daterangepicker/icons/_fusionnew.scss +13 -8
- package/styles/daterangepicker/icons/_highcontrast-light.scss +13 -8
- package/styles/daterangepicker/icons/_highcontrast.scss +13 -8
- package/styles/daterangepicker/icons/_material-dark.scss +13 -7
- package/styles/daterangepicker/icons/_material.scss +13 -7
- package/styles/daterangepicker/icons/_material3.scss +13 -8
- package/styles/daterangepicker/icons/_tailwind.scss +13 -8
- package/styles/daterangepicker/material-dark.css +13 -3
- package/styles/daterangepicker/material.css +123 -0
- package/styles/daterangepicker/tailwind-dark.css +13 -2
- package/styles/daterangepicker/tailwind.css +13 -2
- package/styles/datetimepicker/_all.scss +1 -1
- package/styles/datetimepicker/_bootstrap-dark-definition.scss +7 -3
- package/styles/datetimepicker/_bootstrap-definition.scss +6 -1
- package/styles/datetimepicker/_bootstrap4-definition.scss +6 -1
- package/styles/datetimepicker/_bootstrap5-definition.scss +5 -0
- package/styles/datetimepicker/_fabric-dark-definition.scss +5 -0
- package/styles/datetimepicker/_fabric-definition.scss +4 -0
- package/styles/datetimepicker/_fluent-definition.scss +8 -3
- package/styles/datetimepicker/_fusionnew-definition.scss +5 -0
- package/styles/datetimepicker/_highcontrast-definition.scss +4 -0
- package/styles/datetimepicker/_highcontrast-light-definition.scss +6 -1
- package/styles/datetimepicker/_layout.scss +2 -3
- package/styles/datetimepicker/_material-dark-definition.scss +6 -1
- package/styles/datetimepicker/_material-definition.scss +4 -0
- package/styles/datetimepicker/_material3-definition.scss +5 -0
- package/styles/datetimepicker/_tailwind-definition.scss +5 -0
- package/styles/datetimepicker/_theme.scss +2 -1
- package/styles/datetimepicker/bootstrap-dark.css +2 -0
- package/styles/datetimepicker/bootstrap.css +2 -0
- package/styles/datetimepicker/bootstrap4.css +2 -0
- package/styles/datetimepicker/bootstrap5-dark.css +3 -0
- package/styles/datetimepicker/bootstrap5.css +3 -0
- package/styles/datetimepicker/fabric-dark.css +2 -0
- package/styles/datetimepicker/fabric.css +2 -0
- package/styles/datetimepicker/fluent-dark.css +3 -0
- package/styles/datetimepicker/fluent.css +3 -0
- package/styles/datetimepicker/highcontrast-light.css +2 -0
- package/styles/datetimepicker/highcontrast.css +2 -0
- package/styles/datetimepicker/icons/_bootstrap-dark.scss +1 -1
- package/styles/datetimepicker/icons/_bootstrap.scss +1 -1
- package/styles/datetimepicker/icons/_bootstrap4.scss +1 -1
- package/styles/datetimepicker/icons/_bootstrap5.scss +1 -1
- package/styles/datetimepicker/icons/_fabric-dark.scss +1 -1
- package/styles/datetimepicker/icons/_fabric.scss +1 -1
- package/styles/datetimepicker/icons/_fluent.scss +1 -1
- package/styles/datetimepicker/icons/_fusionnew.scss +1 -1
- package/styles/datetimepicker/icons/_highcontrast-light.scss +1 -0
- package/styles/datetimepicker/icons/_highcontrast.scss +1 -1
- package/styles/datetimepicker/icons/_material-dark.scss +1 -1
- package/styles/datetimepicker/icons/_material.scss +1 -0
- package/styles/datetimepicker/icons/_material3.scss +1 -1
- package/styles/datetimepicker/icons/_tailwind.scss +1 -1
- package/styles/datetimepicker/material-dark.css +2 -0
- package/styles/datetimepicker/material.css +2 -0
- package/styles/datetimepicker/tailwind-dark.css +3 -0
- package/styles/datetimepicker/tailwind.css +3 -0
- package/styles/fabric-dark.css +21 -2
- package/styles/fabric.css +21 -4
- package/styles/fluent-dark.css +25 -4
- package/styles/fluent.css +25 -4
- package/styles/highcontrast-light.css +21 -2
- package/styles/highcontrast.css +21 -2
- package/styles/material-dark.css +23 -4
- package/styles/material.css +215 -0
- package/styles/tailwind-dark.css +27 -4
- package/styles/tailwind.css +27 -4
- package/styles/timepicker/_all.scss +1 -1
- package/styles/timepicker/_bootstrap-dark-definition.scss +6 -1
- package/styles/timepicker/_bootstrap-definition.scss +4 -0
- package/styles/timepicker/_bootstrap4-definition.scss +5 -0
- package/styles/timepicker/_bootstrap5-definition.scss +5 -0
- package/styles/timepicker/_fabric-dark-definition.scss +6 -1
- package/styles/timepicker/_fabric-definition.scss +4 -0
- package/styles/timepicker/_fluent-definition.scss +5 -0
- package/styles/timepicker/_fusionnew-definition.scss +5 -0
- package/styles/timepicker/_highcontrast-definition.scss +4 -0
- package/styles/timepicker/_highcontrast-light-definition.scss +6 -1
- package/styles/timepicker/_layout.scss +4 -5
- package/styles/timepicker/_material-dark-definition.scss +6 -1
- package/styles/timepicker/_material-definition.scss +4 -0
- package/styles/timepicker/_material3-definition.scss +5 -0
- package/styles/timepicker/_tailwind-definition.scss +5 -0
- package/styles/timepicker/_theme.scss +2 -1
- package/styles/timepicker/bootstrap-dark.css +4 -0
- package/styles/timepicker/bootstrap.css +4 -0
- package/styles/timepicker/bootstrap4.css +4 -0
- package/styles/timepicker/bootstrap5-dark.css +5 -0
- package/styles/timepicker/bootstrap5.css +5 -0
- package/styles/timepicker/fabric-dark.css +4 -0
- package/styles/timepicker/fabric.css +4 -0
- package/styles/timepicker/fluent-dark.css +5 -0
- package/styles/timepicker/fluent.css +5 -0
- package/styles/timepicker/highcontrast-light.css +4 -0
- package/styles/timepicker/highcontrast.css +4 -0
- package/styles/timepicker/icons/_bootstrap-dark.scss +1 -2
- package/styles/timepicker/icons/_bootstrap.scss +1 -2
- package/styles/timepicker/icons/_bootstrap4.scss +1 -2
- package/styles/timepicker/icons/_bootstrap5.scss +1 -2
- package/styles/timepicker/icons/_fabric-dark.scss +1 -2
- package/styles/timepicker/icons/_fabric.scss +1 -2
- package/styles/timepicker/icons/_fluent.scss +1 -2
- package/styles/timepicker/icons/_fusionnew.scss +1 -2
- package/styles/timepicker/icons/_highcontrast-light.scss +1 -2
- package/styles/timepicker/icons/_highcontrast.scss +1 -2
- package/styles/timepicker/icons/_material-dark.scss +1 -2
- package/styles/timepicker/icons/_material.scss +1 -1
- package/styles/timepicker/icons/_material3.scss +1 -2
- package/styles/timepicker/icons/_tailwind.scss +1 -2
- package/styles/timepicker/material-dark.css +4 -0
- package/styles/timepicker/material.css +4 -0
- package/styles/timepicker/tailwind-dark.css +5 -0
- package/styles/timepicker/tailwind.css +5 -0
|
@@ -69,6 +69,7 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
69
69
|
this.isTodayClicked = false;
|
|
70
70
|
this.preventChange = false;
|
|
71
71
|
this.isAngular = false;
|
|
72
|
+
this.previousDates = false;
|
|
72
73
|
}
|
|
73
74
|
/**
|
|
74
75
|
* To Initialize the control rendering.
|
|
@@ -117,7 +118,7 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
117
118
|
this.calendarElement.classList.add(DEVICE);
|
|
118
119
|
}
|
|
119
120
|
attributes(this.calendarElement, {
|
|
120
|
-
'role': 'calendar'
|
|
121
|
+
'data-role': 'calendar'
|
|
121
122
|
});
|
|
122
123
|
}
|
|
123
124
|
this.createHeader();
|
|
@@ -245,7 +246,7 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
245
246
|
}
|
|
246
247
|
createContent() {
|
|
247
248
|
this.contentElement = this.createElement('div', { className: CONTENT });
|
|
248
|
-
this.table = this.createElement('table', { attrs: { tabIndex: '0', 'role': 'grid', 'aria-activedescendant': '' } });
|
|
249
|
+
this.table = this.createElement('table', { attrs: { tabIndex: '0', 'role': 'grid', 'aria-activedescendant': '', 'aria-labelledby': this.element.id } });
|
|
249
250
|
if (this.getModuleName() === 'calendar') {
|
|
250
251
|
this.element.appendChild(this.contentElement);
|
|
251
252
|
}
|
|
@@ -634,7 +635,7 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
634
635
|
const numCells = this.weekNumber ? 8 : 7;
|
|
635
636
|
let tdEles;
|
|
636
637
|
if (this.calendarMode === 'Gregorian') {
|
|
637
|
-
tdEles = this.renderDays(this.currentDate, value, null, null, isCustomDate);
|
|
638
|
+
tdEles = this.renderDays(this.currentDate, value, null, null, isCustomDate, e);
|
|
638
639
|
}
|
|
639
640
|
else {
|
|
640
641
|
tdEles = this.islamicModule.islamicRenderDays(this.currentDate, value);
|
|
@@ -647,7 +648,7 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
647
648
|
this.islamicModule.islamicRenderTemplate(tdEles, numCells, MONTH, e, value);
|
|
648
649
|
}
|
|
649
650
|
}
|
|
650
|
-
renderDays(currentDate, value, multiSelection, values, isTodayDate) {
|
|
651
|
+
renderDays(currentDate, value, multiSelection, values, isTodayDate, e) {
|
|
651
652
|
const tdEles = [];
|
|
652
653
|
const cellsCount = 42;
|
|
653
654
|
const todayDate = isTodayDate ? new Date(+currentDate) : this.getDate(new Date(), this.timezone);
|
|
@@ -738,6 +739,10 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
738
739
|
// if (args.isDisabled && +this.value === +args.date) {
|
|
739
740
|
// this.setProperties({ value: null }, true);
|
|
740
741
|
// }
|
|
742
|
+
let currentTarget;
|
|
743
|
+
if (!isNullOrUndefined(e) && e.type == 'click') {
|
|
744
|
+
currentTarget = e.currentTarget;
|
|
745
|
+
}
|
|
741
746
|
if (multiSelection && !isNullOrUndefined(values) && !disabledCls) {
|
|
742
747
|
for (let tempValue = 0; tempValue < values.length; tempValue++) {
|
|
743
748
|
const type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
|
|
@@ -748,6 +753,22 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
748
753
|
|| (this.getDateVal(localDate, value))) {
|
|
749
754
|
addClass([tdEle], SELECTED);
|
|
750
755
|
}
|
|
756
|
+
if (!isNullOrUndefined(currentTarget) && currentTarget.innerText === tdEle.innerText && this.previousDates && currentTarget.classList.contains(SELECTED)) {
|
|
757
|
+
removeClass([tdEle], SELECTED);
|
|
758
|
+
this.previousDates = false;
|
|
759
|
+
const copyValues = this.copyValues(values);
|
|
760
|
+
for (let i = 0; i < copyValues.length; i++) {
|
|
761
|
+
const type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
|
|
762
|
+
const formatOptions = { format: null, type: 'date', skeleton: 'short', calendar: type };
|
|
763
|
+
const localDateString = this.globalize.formatDate(date, formatOptions);
|
|
764
|
+
const tempDateString = this.globalize.formatDate(copyValues[i], formatOptions);
|
|
765
|
+
if (localDateString === tempDateString) {
|
|
766
|
+
const index = copyValues.indexOf(copyValues[i]);
|
|
767
|
+
copyValues.splice(index, 1);
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
this.setProperties({ values: copyValues }, true);
|
|
771
|
+
}
|
|
751
772
|
else {
|
|
752
773
|
this.updateFocus(otherMnthBool, disabledCls, localDate, tdEle, currentDate);
|
|
753
774
|
}
|
|
@@ -855,7 +876,6 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
855
876
|
const year = startYear + rowIterator;
|
|
856
877
|
localDate.setFullYear(year);
|
|
857
878
|
const tdEle = this.dayCell(localDate);
|
|
858
|
-
attributes(tdEle, { 'role': 'gridcell' });
|
|
859
879
|
const dayLink = this.createElement('span');
|
|
860
880
|
dayLink.textContent = this.globalize.formatDate(localDate, {
|
|
861
881
|
format: null, type: 'dateTime', skeleton: 'y'
|
|
@@ -896,7 +916,7 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
896
916
|
const date = this.globalize.parseDate(this.globalize.formatDate(localDate, dateFormatOptions), dateFormatOptions);
|
|
897
917
|
const value = date.valueOf();
|
|
898
918
|
const attrs = {
|
|
899
|
-
className: CELL, attrs: { 'id': '' + getUniqueID('' + value), 'aria-selected': 'false'
|
|
919
|
+
className: CELL, attrs: { 'id': '' + getUniqueID('' + value), 'aria-selected': 'false' }
|
|
900
920
|
};
|
|
901
921
|
return this.createElement('td', attrs);
|
|
902
922
|
}
|
|
@@ -970,7 +990,7 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
970
990
|
let row = count;
|
|
971
991
|
let rowIterator = 0;
|
|
972
992
|
for (let dayCell = 0; dayCell < elements.length / count; ++dayCell) {
|
|
973
|
-
trEle = this.createElement('tr'
|
|
993
|
+
trEle = this.createElement('tr');
|
|
974
994
|
for (rowIterator = 0 + rowIterator; rowIterator < row; rowIterator++) {
|
|
975
995
|
if (!elements[rowIterator].classList.contains('e-week-number') && !isNullOrUndefined(elements[rowIterator].children[0])) {
|
|
976
996
|
addClass([elements[rowIterator].children[0]], [LINK]);
|
|
@@ -2186,8 +2206,8 @@ let Calendar = class Calendar extends CalendarBase {
|
|
|
2186
2206
|
renderMonths(e, value, isCustomDate) {
|
|
2187
2207
|
super.renderMonths(e, this.value, isCustomDate);
|
|
2188
2208
|
}
|
|
2189
|
-
renderDays(currentDate, value, isMultiSelect, values, isCustomDate) {
|
|
2190
|
-
const tempDays = super.renderDays(currentDate, this.value, this.isMultiSelection, this.values, isCustomDate);
|
|
2209
|
+
renderDays(currentDate, value, isMultiSelect, values, isCustomDate, e) {
|
|
2210
|
+
const tempDays = super.renderDays(currentDate, this.value, this.isMultiSelection, this.values, isCustomDate, e);
|
|
2191
2211
|
if (this.isMultiSelection) {
|
|
2192
2212
|
super.validateValues(this.isMultiSelection, this.values);
|
|
2193
2213
|
}
|
|
@@ -2225,9 +2245,14 @@ let Calendar = class Calendar extends CalendarBase {
|
|
|
2225
2245
|
if (eve.classList.contains(OTHERMONTH)) {
|
|
2226
2246
|
if (this.isMultiSelection) {
|
|
2227
2247
|
const copyValues = this.copyValues(this.values);
|
|
2228
|
-
copyValues.
|
|
2229
|
-
|
|
2230
|
-
|
|
2248
|
+
if (copyValues.toString().indexOf(this.getIdValue(e, null).toString()) === -1) {
|
|
2249
|
+
copyValues.push(this.getIdValue(e, null));
|
|
2250
|
+
this.setProperties({ values: copyValues }, true);
|
|
2251
|
+
this.setProperties({ value: this.values[this.values.length - 1] }, true);
|
|
2252
|
+
}
|
|
2253
|
+
else {
|
|
2254
|
+
this.previousDates = true;
|
|
2255
|
+
}
|
|
2231
2256
|
}
|
|
2232
2257
|
else {
|
|
2233
2258
|
this.setProperties({ value: this.getIdValue(e, null) }, true);
|
|
@@ -2876,14 +2901,14 @@ class Islamic {
|
|
|
2876
2901
|
dayLink.textContent = this.calendarInstance.globalize.formatDate(localDate, { type: 'dateTime', format: 'y', calendar: 'islamic' });
|
|
2877
2902
|
if (islamicDate.year === parseInt(startHdrYr) - 1 || (year < startFullYr) || (year > endFullYr) && islamicDate.year !== parseInt(endHdrYr)) {
|
|
2878
2903
|
addClass([tdEle], OTHERMONTH$1);
|
|
2879
|
-
if (year < new Date(this.islamicInValue(this.calendarInstance.min)).getFullYear()
|
|
2880
|
-
|| year > new Date(this.islamicInValue(this.calendarInstance.max)).getFullYear()) {
|
|
2881
|
-
addClass([tdEle], DISABLED$1);
|
|
2882
|
-
}
|
|
2883
2904
|
}
|
|
2884
2905
|
else if (year < new Date(this.islamicInValue(this.calendarInstance.min)).getFullYear()
|
|
2885
2906
|
|| year > new Date(this.islamicInValue(this.calendarInstance.max)).getFullYear()) {
|
|
2886
2907
|
addClass([tdEle], DISABLED$1);
|
|
2908
|
+
if (year < new Date(this.islamicInValue(this.calendarInstance.min)).getFullYear()
|
|
2909
|
+
|| year > new Date(this.islamicInValue(this.calendarInstance.max)).getFullYear()) {
|
|
2910
|
+
addClass([tdEle], DISABLED$1);
|
|
2911
|
+
}
|
|
2887
2912
|
}
|
|
2888
2913
|
else if (!isNullOrUndefined(value) &&
|
|
2889
2914
|
(this.getIslamicDate(localDate)).year ===
|
|
@@ -3117,6 +3142,10 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3117
3142
|
render() {
|
|
3118
3143
|
this.initialize();
|
|
3119
3144
|
this.bindEvents();
|
|
3145
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
3146
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
3147
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
3148
|
+
}
|
|
3120
3149
|
this.renderComplete();
|
|
3121
3150
|
this.setTimeZone(this.serverTimezoneOffset);
|
|
3122
3151
|
}
|
|
@@ -3180,10 +3209,9 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3180
3209
|
}
|
|
3181
3210
|
createInput() {
|
|
3182
3211
|
const ariaAttrs = {
|
|
3183
|
-
'aria-live': 'assertive', 'aria-atomic': 'true',
|
|
3184
|
-
'
|
|
3185
|
-
'
|
|
3186
|
-
'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false', 'aria-invalid': 'false'
|
|
3212
|
+
'aria-live': 'assertive', 'aria-atomic': 'true', 'aria-expanded': 'false',
|
|
3213
|
+
'role': 'combobox', 'autocomplete': 'off', 'autocorrect': 'off',
|
|
3214
|
+
'autocapitalize': 'off', 'spellcheck': 'false', 'aria-invalid': 'false'
|
|
3187
3215
|
};
|
|
3188
3216
|
if (this.getModuleName() === 'datepicker') {
|
|
3189
3217
|
const l10nLocale = { placeholder: this.placeholder };
|
|
@@ -4381,8 +4409,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4381
4409
|
}
|
|
4382
4410
|
const ariaAttrs = {
|
|
4383
4411
|
'aria-live': 'assertive', 'aria-atomic': 'true', 'aria-disabled': 'true',
|
|
4384
|
-
'aria-
|
|
4385
|
-
'aria-owns': this.element.id + '_options', 'aria-expanded': 'false', 'role': 'combobox', 'autocomplete': 'off',
|
|
4412
|
+
'aria-expanded': 'false', 'role': 'combobox', 'autocomplete': 'off',
|
|
4386
4413
|
'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false'
|
|
4387
4414
|
};
|
|
4388
4415
|
if (this.inputElement) {
|
|
@@ -4706,11 +4733,15 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4706
4733
|
setAriaAttributes() {
|
|
4707
4734
|
if (this.isCalendar()) {
|
|
4708
4735
|
Input.addAttributes({ 'aria-expanded': 'true' }, this.inputElement);
|
|
4709
|
-
attributes(this.inputElement, { 'aria-
|
|
4736
|
+
attributes(this.inputElement, { 'aria-owns': this.inputElement.id + '_options' });
|
|
4737
|
+
if (this.value) {
|
|
4738
|
+
attributes(this.inputElement, { 'aria-activedescendant': '' + this.setActiveDescendant() });
|
|
4739
|
+
}
|
|
4710
4740
|
}
|
|
4711
4741
|
else {
|
|
4712
4742
|
Input.addAttributes({ 'aria-expanded': 'false' }, this.inputElement);
|
|
4713
|
-
|
|
4743
|
+
this.inputElement.removeAttribute('aria-owns');
|
|
4744
|
+
this.inputElement.removeAttribute('aria-activedescendant');
|
|
4714
4745
|
}
|
|
4715
4746
|
}
|
|
4716
4747
|
errorClass() {
|
|
@@ -4833,11 +4864,18 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4833
4864
|
break;
|
|
4834
4865
|
case 'width':
|
|
4835
4866
|
this.setWidth(newProp.width);
|
|
4867
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
4868
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
4869
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
4870
|
+
}
|
|
4836
4871
|
break;
|
|
4837
4872
|
case 'floatLabelType':
|
|
4838
4873
|
this.floatLabelType = newProp.floatLabelType;
|
|
4839
4874
|
Input.removeFloating(this.inputWrapper);
|
|
4840
4875
|
Input.addFloating(this.inputElement, this.floatLabelType, this.placeholder);
|
|
4876
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
4877
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
4878
|
+
}
|
|
4841
4879
|
break;
|
|
4842
4880
|
case 'enableMask':
|
|
4843
4881
|
if (this.enableMask) {
|
|
@@ -4859,7 +4897,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4859
4897
|
}
|
|
4860
4898
|
break;
|
|
4861
4899
|
}
|
|
4862
|
-
if (!this.isDynamicValueChanged) {
|
|
4900
|
+
if (!this.isDynamicValueChanged && !this.isIconClicked) {
|
|
4863
4901
|
this.hide(null);
|
|
4864
4902
|
}
|
|
4865
4903
|
this.isDynamicValueChanged = false;
|
|
@@ -5078,6 +5116,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5078
5116
|
this.invalidValueString = null;
|
|
5079
5117
|
this.isAngular = false;
|
|
5080
5118
|
this.preventChange = false;
|
|
5119
|
+
this.isPropChanged = false;
|
|
5081
5120
|
this.dateRangeOptions = options;
|
|
5082
5121
|
}
|
|
5083
5122
|
/**
|
|
@@ -5095,6 +5134,10 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5095
5134
|
if (this.element.hasAttribute('data-val')) {
|
|
5096
5135
|
this.element.setAttribute('data-val', 'false');
|
|
5097
5136
|
}
|
|
5137
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
5138
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
5139
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
5140
|
+
}
|
|
5098
5141
|
this.renderComplete();
|
|
5099
5142
|
}
|
|
5100
5143
|
/**
|
|
@@ -7240,7 +7283,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
7240
7283
|
if (this.enableRtl) {
|
|
7241
7284
|
this.calendarElement.classList.add(RTL$1);
|
|
7242
7285
|
}
|
|
7243
|
-
attributes(this.calendarElement, { 'role': 'calendar' });
|
|
7286
|
+
attributes(this.calendarElement, { 'data-role': 'calendar' });
|
|
7244
7287
|
super.createHeader();
|
|
7245
7288
|
super.createContent();
|
|
7246
7289
|
}
|
|
@@ -7798,7 +7841,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
7798
7841
|
if (!isUndefined(this.presets[0].start && this.presets[0].end && this.presets[0].label)) {
|
|
7799
7842
|
this.presetElement = this.createElement('div', { className: PRESETS, attrs: { 'tabindex': '0' } });
|
|
7800
7843
|
const listTag = ListBase.createList(this.createElement, this.presetsItem, null, true);
|
|
7801
|
-
attributes(listTag, { 'role': 'listbox', 'aria-hidden': 'false', 'id': this.element.id + '_options' });
|
|
7844
|
+
attributes(listTag, { 'role': 'listbox', 'aria-hidden': 'false', 'id': this.element.id + '_options', 'tabindex': '0' });
|
|
7802
7845
|
this.presetElement.appendChild(listTag);
|
|
7803
7846
|
this.popupWrapper.appendChild(this.presetElement);
|
|
7804
7847
|
const customElement = this.presetElement.querySelector('#custom_range');
|
|
@@ -7858,7 +7901,13 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
7858
7901
|
enableRtl: this.enableRtl,
|
|
7859
7902
|
zIndex: this.zIndex,
|
|
7860
7903
|
open: () => {
|
|
7861
|
-
attributes(this.inputElement, { 'aria-expanded': 'true' });
|
|
7904
|
+
attributes(this.inputElement, { 'aria-expanded': 'true', 'aria-owns': this.inputElement.id + '_options' });
|
|
7905
|
+
if (this.value) {
|
|
7906
|
+
attributes(this.inputElement, { 'aria-activedescendant': this.inputElement.id });
|
|
7907
|
+
}
|
|
7908
|
+
else {
|
|
7909
|
+
this.inputElement.removeAttribute('aria-activedescendant');
|
|
7910
|
+
}
|
|
7862
7911
|
addClass([this.inputWrapper.buttons[0]], ACTIVE$1);
|
|
7863
7912
|
if (!this.isMobile) {
|
|
7864
7913
|
if (this.cancelButton) {
|
|
@@ -7906,6 +7955,8 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
7906
7955
|
},
|
|
7907
7956
|
close: () => {
|
|
7908
7957
|
attributes(this.inputElement, { 'aria-expanded': 'false' });
|
|
7958
|
+
this.inputElement.removeAttribute('aria-owns');
|
|
7959
|
+
this.inputElement.removeAttribute('aria-activedescendant');
|
|
7909
7960
|
removeClass([this.inputWrapper.buttons[0]], ACTIVE$1);
|
|
7910
7961
|
if (this.isRangeIconClicked) {
|
|
7911
7962
|
this.inputWrapper.container.children[1].focus();
|
|
@@ -8172,7 +8223,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
8172
8223
|
}
|
|
8173
8224
|
const target = e.target;
|
|
8174
8225
|
if (!this.inputWrapper.container.contains(target) ||
|
|
8175
|
-
(!isNullOrUndefined(this.popupObj) && !closest(target, '[id="' + this.popupWrapper.id + '"]') && e.type
|
|
8226
|
+
(!isNullOrUndefined(this.popupObj) && !closest(target, '[id="' + this.popupWrapper.id + '"]') && e.type !== 'mousedown')) {
|
|
8176
8227
|
if (e.type !== 'touchstart' && ((e.type === 'mousedown') ||
|
|
8177
8228
|
this.closeEventArgs && !this.closeEventArgs.cancel)) {
|
|
8178
8229
|
e.preventDefault();
|
|
@@ -8211,9 +8262,8 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
8211
8262
|
buttons: [DATERANGEICON]
|
|
8212
8263
|
}, this.createElement);
|
|
8213
8264
|
attributes(this.inputElement, {
|
|
8214
|
-
'
|
|
8215
|
-
'
|
|
8216
|
-
'role': 'combobox', 'autocomplete': 'off', 'aria-disabled': !this.enabled ? 'true' : 'false',
|
|
8265
|
+
'tabindex': '0', 'aria-expanded': 'false', 'role': 'combobox',
|
|
8266
|
+
'autocomplete': 'off', 'aria-disabled': !this.enabled ? 'true' : 'false',
|
|
8217
8267
|
'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false'
|
|
8218
8268
|
});
|
|
8219
8269
|
Input.addAttributes({ 'aria-label': 'select' }, this.inputWrapper.buttons[0]);
|
|
@@ -8644,9 +8694,8 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
8644
8694
|
this.unBindEvents();
|
|
8645
8695
|
this.hide(null);
|
|
8646
8696
|
const ariaAttrs = {
|
|
8647
|
-
'
|
|
8648
|
-
'
|
|
8649
|
-
'role': 'combobox', 'autocomplete': 'off', 'aria-disabled': !this.enabled ? 'true' : 'false',
|
|
8697
|
+
'tabindex': '0', 'aria-expanded': 'false', 'role': 'combobox',
|
|
8698
|
+
'autocomplete': 'off', 'aria-disabled': !this.enabled ? 'true' : 'false',
|
|
8650
8699
|
'autocorrect': 'off', 'autocapitalize': 'off', 'aria-invalid': 'false', 'spellcheck': 'false'
|
|
8651
8700
|
};
|
|
8652
8701
|
if (this.inputElement) {
|
|
@@ -9002,12 +9051,13 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
9002
9051
|
const format = { format: this.formatString, type: 'date', skeleton: 'yMd' };
|
|
9003
9052
|
for (const prop of Object.keys(newProp)) {
|
|
9004
9053
|
const openPopup = ['maxDays', 'minDays', 'value'];
|
|
9005
|
-
if (openPopup.indexOf(prop) < 0) {
|
|
9006
|
-
this.hide(null);
|
|
9007
|
-
}
|
|
9008
9054
|
switch (prop) {
|
|
9009
9055
|
case 'width':
|
|
9010
9056
|
this.setEleWidth(this.width);
|
|
9057
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
9058
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
9059
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
9060
|
+
}
|
|
9011
9061
|
break;
|
|
9012
9062
|
case 'separator':
|
|
9013
9063
|
this.previousEleValue = this.inputElement.value;
|
|
@@ -9021,7 +9071,6 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
9021
9071
|
break;
|
|
9022
9072
|
case 'readonly':
|
|
9023
9073
|
Input.setReadonly(this.readonly, this.inputElement);
|
|
9024
|
-
this.inputElement.setAttribute('aria-readonly', '' + this.readonly);
|
|
9025
9074
|
this.setRangeAllowEdit();
|
|
9026
9075
|
break;
|
|
9027
9076
|
case 'cssClass':
|
|
@@ -9199,6 +9248,9 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
9199
9248
|
this.floatLabelType = newProp.floatLabelType;
|
|
9200
9249
|
Input.removeFloating(this.inputWrapper);
|
|
9201
9250
|
Input.addFloating(this.inputElement, this.floatLabelType, this.placeholder);
|
|
9251
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
9252
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
9253
|
+
}
|
|
9202
9254
|
break;
|
|
9203
9255
|
case 'start':
|
|
9204
9256
|
this.setProperties({ start: newProp.start }, true);
|
|
@@ -9208,7 +9260,13 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
9208
9260
|
this.setProperties({ depth: newProp.depth }, true);
|
|
9209
9261
|
this.refreshChange();
|
|
9210
9262
|
break;
|
|
9263
|
+
default:
|
|
9264
|
+
this.isPropChanged = true;
|
|
9265
|
+
}
|
|
9266
|
+
if (openPopup.indexOf(prop) < 0 && !this.isPropChanged) {
|
|
9267
|
+
this.hide(null);
|
|
9211
9268
|
}
|
|
9269
|
+
this.isPropChanged = false;
|
|
9212
9270
|
}
|
|
9213
9271
|
}
|
|
9214
9272
|
};
|
|
@@ -9513,6 +9571,9 @@ let TimePicker = class TimePicker extends Component {
|
|
|
9513
9571
|
this.anchor = this.inputElement;
|
|
9514
9572
|
this.inputElement.setAttribute('value', this.inputElement.value);
|
|
9515
9573
|
this.inputEleValue = this.getDateObject(this.inputElement.value);
|
|
9574
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
9575
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
9576
|
+
}
|
|
9516
9577
|
this.renderComplete();
|
|
9517
9578
|
}
|
|
9518
9579
|
setTimeAllowEdit() {
|
|
@@ -9658,9 +9719,10 @@ let TimePicker = class TimePicker extends Component {
|
|
|
9658
9719
|
}, this.createElement);
|
|
9659
9720
|
this.inputWrapper.container.style.width = this.setWidth(this.width);
|
|
9660
9721
|
attributes(this.inputElement, {
|
|
9661
|
-
'aria-
|
|
9662
|
-
'aria-
|
|
9663
|
-
'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false',
|
|
9722
|
+
'aria-autocomplete': 'list', 'tabindex': '0',
|
|
9723
|
+
'aria-expanded': 'false', 'role': 'combobox', 'autocomplete': 'off',
|
|
9724
|
+
'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false',
|
|
9725
|
+
'aria-disabled': 'false', 'aria-invalid': 'false'
|
|
9664
9726
|
});
|
|
9665
9727
|
if (!this.isNullOrEmpty(this.inputStyle)) {
|
|
9666
9728
|
Input.addAttributes({ 'style': this.inputStyle }, this.inputElement);
|
|
@@ -9761,9 +9823,10 @@ let TimePicker = class TimePicker extends Component {
|
|
|
9761
9823
|
this.hide();
|
|
9762
9824
|
this.unBindEvents();
|
|
9763
9825
|
const ariaAttribute = {
|
|
9764
|
-
'aria-
|
|
9765
|
-
'aria-
|
|
9766
|
-
'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false',
|
|
9826
|
+
'aria-autocomplete': 'list', 'tabindex': '0',
|
|
9827
|
+
'aria-expanded': 'false', 'role': 'combobox', 'autocomplete': 'off',
|
|
9828
|
+
'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false',
|
|
9829
|
+
'aria-disabled': 'true', 'aria-invalid': 'false'
|
|
9767
9830
|
};
|
|
9768
9831
|
if (this.inputElement) {
|
|
9769
9832
|
Input.removeAttributes(ariaAttribute, this.inputElement);
|
|
@@ -9863,7 +9926,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
9863
9926
|
}, close: () => {
|
|
9864
9927
|
removeClass([this.inputWrapper.buttons[0]], SELECTED$4);
|
|
9865
9928
|
this.unWireListEvents();
|
|
9866
|
-
this.inputElement.
|
|
9929
|
+
this.inputElement.removeAttribute('aria-activedescendant');
|
|
9867
9930
|
remove(this.popupObj.element);
|
|
9868
9931
|
this.popupObj.destroy();
|
|
9869
9932
|
this.popupWrapper.innerHTML = '';
|
|
@@ -10352,6 +10415,8 @@ let TimePicker = class TimePicker extends Component {
|
|
|
10352
10415
|
this.popupObj.hide(new Animation(animModel));
|
|
10353
10416
|
removeClass([this.inputWrapper.container], [ICONANIMATION]);
|
|
10354
10417
|
attributes(this.inputElement, { 'aria-expanded': 'false' });
|
|
10418
|
+
this.inputElement.removeAttribute('aria-owns');
|
|
10419
|
+
this.inputElement.removeAttribute('aria-activedescendant');
|
|
10355
10420
|
EventHandler.remove(document, 'mousedown touchstart', this.documentClickHandler);
|
|
10356
10421
|
}
|
|
10357
10422
|
if (Browser.isDevice && this.modal) {
|
|
@@ -11114,11 +11179,11 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11114
11179
|
this.clearIconState();
|
|
11115
11180
|
}
|
|
11116
11181
|
setActiveDescendant() {
|
|
11117
|
-
if (!isNullOrUndefined(this.selectedElement)) {
|
|
11182
|
+
if (!isNullOrUndefined(this.selectedElement) && this.value) {
|
|
11118
11183
|
attributes(this.inputElement, { 'aria-activedescendant': this.selectedElement.getAttribute('id') });
|
|
11119
11184
|
}
|
|
11120
11185
|
else {
|
|
11121
|
-
|
|
11186
|
+
this.inputElement.removeAttribute('aria-activedescendant');
|
|
11122
11187
|
}
|
|
11123
11188
|
}
|
|
11124
11189
|
removeSelection() {
|
|
@@ -11207,7 +11272,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11207
11272
|
return value;
|
|
11208
11273
|
}
|
|
11209
11274
|
createListItems() {
|
|
11210
|
-
this.listWrapper = this.createElement('div', { className: CONTENT$2, attrs: { 'tabindex': '
|
|
11275
|
+
this.listWrapper = this.createElement('div', { className: CONTENT$2, attrs: { 'tabindex': '-1' } });
|
|
11211
11276
|
let start;
|
|
11212
11277
|
const interval = this.step * 60000;
|
|
11213
11278
|
const listItems = [];
|
|
@@ -11237,7 +11302,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11237
11302
|
}
|
|
11238
11303
|
};
|
|
11239
11304
|
this.listTag = ListBase.createList(this.createElement, listItems, listBaseOptions, true);
|
|
11240
|
-
attributes(this.listTag, { 'role': 'listbox', 'aria-hidden': 'false', 'id': this.element.id + '_options' });
|
|
11305
|
+
attributes(this.listTag, { 'role': 'listbox', 'aria-hidden': 'false', 'id': this.element.id + '_options', 'tabindex': '0' });
|
|
11241
11306
|
append([this.listTag], this.listWrapper);
|
|
11242
11307
|
}
|
|
11243
11308
|
documentClickHandler(event) {
|
|
@@ -11449,6 +11514,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11449
11514
|
}
|
|
11450
11515
|
this.setActiveDescendant();
|
|
11451
11516
|
attributes(this.inputElement, { 'aria-expanded': 'true' });
|
|
11517
|
+
attributes(this.inputElement, { 'aria-owns': this.inputElement.id + '_options' });
|
|
11452
11518
|
addClass([this.inputWrapper.container], FOCUS);
|
|
11453
11519
|
EventHandler.add(document, 'mousedown touchstart', this.documentClickHandler, this);
|
|
11454
11520
|
this.setOverlayIndex(this.mobileTimePopupWrap, this.popupObj.element, this.modal, Browser.isDevice);
|
|
@@ -11561,7 +11627,6 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11561
11627
|
switch (prop) {
|
|
11562
11628
|
case 'placeholder':
|
|
11563
11629
|
Input.setPlaceholder(newProp.placeholder, this.inputElement);
|
|
11564
|
-
this.inputElement.setAttribute('aria-placeholder', newProp.placeholder);
|
|
11565
11630
|
break;
|
|
11566
11631
|
case 'readonly':
|
|
11567
11632
|
Input.setReadonly(this.readonly, this.inputElement, this.floatLabelType);
|
|
@@ -11616,6 +11681,10 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11616
11681
|
case 'width':
|
|
11617
11682
|
setStyleAttribute(this.inputWrapper.container, { 'width': this.setWidth(newProp.width) });
|
|
11618
11683
|
this.containerStyle = this.inputWrapper.container.getBoundingClientRect();
|
|
11684
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
11685
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
11686
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
11687
|
+
}
|
|
11619
11688
|
break;
|
|
11620
11689
|
case 'format':
|
|
11621
11690
|
this.setProperties({ format: newProp.format }, true);
|
|
@@ -11666,6 +11735,9 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11666
11735
|
this.floatLabelType = newProp.floatLabelType;
|
|
11667
11736
|
Input.removeFloating(this.inputWrapper);
|
|
11668
11737
|
Input.addFloating(this.inputElement, this.floatLabelType, this.placeholder);
|
|
11738
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
11739
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
11740
|
+
}
|
|
11669
11741
|
break;
|
|
11670
11742
|
case 'strictMode':
|
|
11671
11743
|
this.invalidValueString = null;
|
|
@@ -11941,13 +12013,11 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
11941
12013
|
}
|
|
11942
12014
|
const ariaAttribute = {
|
|
11943
12015
|
'aria-live': 'assertive', 'aria-atomic': 'true', 'aria-invalid': 'false',
|
|
11944
|
-
'aria-haspopup': 'true', 'aria-activedescendant': 'null',
|
|
11945
12016
|
'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false',
|
|
11946
|
-
'aria-
|
|
12017
|
+
'aria-expanded': 'false', 'role': 'combobox', 'autocomplete': 'off'
|
|
11947
12018
|
};
|
|
11948
12019
|
if (this.inputElement) {
|
|
11949
12020
|
Input.removeAttributes(ariaAttribute, this.inputElement);
|
|
11950
|
-
this.inputElement.removeAttribute('aria-placeholder');
|
|
11951
12021
|
}
|
|
11952
12022
|
if (this.isCalendar()) {
|
|
11953
12023
|
if (this.popupWrapper) {
|
|
@@ -12012,6 +12082,10 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
12012
12082
|
this.inputElement.tabIndex = -1;
|
|
12013
12083
|
}
|
|
12014
12084
|
}
|
|
12085
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
12086
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
12087
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-date-time-icon');
|
|
12088
|
+
}
|
|
12015
12089
|
this.renderComplete();
|
|
12016
12090
|
}
|
|
12017
12091
|
setValue() {
|
|
@@ -12357,6 +12431,7 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
12357
12431
|
}
|
|
12358
12432
|
addClass([this.inputWrapper.container], [ICONANIMATION$1]);
|
|
12359
12433
|
attributes(this.inputElement, { 'aria-expanded': 'true' });
|
|
12434
|
+
attributes(this.inputElement, { 'aria-owns': this.inputElement.id + '_options' });
|
|
12360
12435
|
EventHandler.add(document, 'mousedown touchstart', this.documentClickHandler, this);
|
|
12361
12436
|
}
|
|
12362
12437
|
});
|
|
@@ -12420,7 +12495,7 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
12420
12495
|
}, close: () => {
|
|
12421
12496
|
removeClass([this.timeIcon], ACTIVE$2);
|
|
12422
12497
|
this.unWireTimeListEvents();
|
|
12423
|
-
this.inputElement.
|
|
12498
|
+
this.inputElement.removeAttribute('aria-activedescendant');
|
|
12424
12499
|
remove(this.popupObject.element);
|
|
12425
12500
|
this.popupObject.destroy();
|
|
12426
12501
|
this.dateTimeWrapper.innerHTML = '';
|
|
@@ -12636,11 +12711,11 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
12636
12711
|
}
|
|
12637
12712
|
}
|
|
12638
12713
|
setTimeActiveDescendant() {
|
|
12639
|
-
if (!isNullOrUndefined(this.selectedElement)) {
|
|
12714
|
+
if (!isNullOrUndefined(this.selectedElement) && this.value) {
|
|
12640
12715
|
attributes(this.inputElement, { 'aria-activedescendant': this.selectedElement.getAttribute('id') });
|
|
12641
12716
|
}
|
|
12642
12717
|
else {
|
|
12643
|
-
|
|
12718
|
+
this.inputElement.removeAttribute('aria-activedescendant');
|
|
12644
12719
|
}
|
|
12645
12720
|
}
|
|
12646
12721
|
addTimeSelection() {
|
|
@@ -12798,6 +12873,7 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
12798
12873
|
this.popupObject.hide(new Animation(animModel));
|
|
12799
12874
|
this.inputWrapper.container.classList.remove(ICONANIMATION$1);
|
|
12800
12875
|
attributes(this.inputElement, { 'aria-expanded': 'false' });
|
|
12876
|
+
this.inputElement.removeAttribute('aria-owns');
|
|
12801
12877
|
EventHandler.remove(document, 'mousedown touchstart', this.documentClickHandler);
|
|
12802
12878
|
}
|
|
12803
12879
|
}
|
|
@@ -13183,7 +13259,6 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13183
13259
|
break;
|
|
13184
13260
|
case 'placeholder':
|
|
13185
13261
|
Input.setPlaceholder(newProp.placeholder, this.inputElement);
|
|
13186
|
-
this.inputElement.setAttribute('aria-placeholder', newProp.placeholder);
|
|
13187
13262
|
break;
|
|
13188
13263
|
case 'enabled':
|
|
13189
13264
|
Input.setEnabled(this.enabled, this.inputElement);
|
|
@@ -13197,6 +13272,10 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13197
13272
|
break;
|
|
13198
13273
|
case 'width':
|
|
13199
13274
|
this.setWidth(newProp.width);
|
|
13275
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
13276
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
13277
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-date-time-icon');
|
|
13278
|
+
}
|
|
13200
13279
|
break;
|
|
13201
13280
|
case 'readonly':
|
|
13202
13281
|
Input.setReadonly(this.readonly, this.inputElement);
|
|
@@ -13205,6 +13284,9 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13205
13284
|
this.floatLabelType = newProp.floatLabelType;
|
|
13206
13285
|
Input.removeFloating(this.inputWrapper);
|
|
13207
13286
|
Input.addFloating(this.inputElement, this.floatLabelType, this.placeholder);
|
|
13287
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
13288
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-date-time-icon');
|
|
13289
|
+
}
|
|
13208
13290
|
break;
|
|
13209
13291
|
case 'scrollTo':
|
|
13210
13292
|
if (this.checkDateValue(new Date(this.checkValue(newProp.scrollTo)))) {
|
|
@@ -13235,7 +13317,7 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13235
13317
|
super.onPropertyChanged(newProp, oldProp);
|
|
13236
13318
|
break;
|
|
13237
13319
|
}
|
|
13238
|
-
if (!this.isDynamicValueChanged) {
|
|
13320
|
+
if (!this.isDynamicValueChanged && !this.isIconClicked) {
|
|
13239
13321
|
this.hide(null);
|
|
13240
13322
|
}
|
|
13241
13323
|
this.isDynamicValueChanged = false;
|