@openui5/sap.ui.unified 1.111.4 → 1.111.5
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/package.json +2 -2
- package/src/sap/ui/unified/.library +1 -1
- package/src/sap/ui/unified/Calendar.js +48 -56
- package/src/sap/ui/unified/CalendarAppointment.js +1 -1
- package/src/sap/ui/unified/CalendarDateInterval.js +1 -1
- package/src/sap/ui/unified/CalendarLegend.js +1 -1
- package/src/sap/ui/unified/CalendarLegendItem.js +1 -1
- package/src/sap/ui/unified/CalendarMonthInterval.js +1 -1
- package/src/sap/ui/unified/CalendarOneMonthInterval.js +1 -1
- package/src/sap/ui/unified/CalendarRow.js +1 -1
- package/src/sap/ui/unified/CalendarTimeInterval.js +1 -1
- package/src/sap/ui/unified/CalendarWeekInterval.js +1 -1
- package/src/sap/ui/unified/ColorPicker.js +1 -1
- package/src/sap/ui/unified/ColorPickerPopover.js +1 -1
- package/src/sap/ui/unified/ContentSwitcher.js +1 -1
- package/src/sap/ui/unified/Currency.js +1 -1
- package/src/sap/ui/unified/CurrencyRenderer.js +1 -1
- package/src/sap/ui/unified/DateRange.js +1 -1
- package/src/sap/ui/unified/DateTypeRange.js +1 -1
- package/src/sap/ui/unified/FileUploader.js +1 -1
- package/src/sap/ui/unified/FileUploaderParameter.js +1 -1
- package/src/sap/ui/unified/FileUploaderXHRSettings.js +1 -1
- package/src/sap/ui/unified/Menu.js +1 -1
- package/src/sap/ui/unified/MenuItem.js +1 -1
- package/src/sap/ui/unified/MenuItemBase.js +1 -1
- package/src/sap/ui/unified/MenuRenderer.js +1 -1
- package/src/sap/ui/unified/MenuTextFieldItem.js +1 -1
- package/src/sap/ui/unified/Shell.js +1 -1
- package/src/sap/ui/unified/ShellHeadItem.js +1 -1
- package/src/sap/ui/unified/ShellHeadUserItem.js +1 -1
- package/src/sap/ui/unified/ShellLayout.js +1 -1
- package/src/sap/ui/unified/ShellOverlay.js +1 -1
- package/src/sap/ui/unified/SplitContainer.js +1 -1
- package/src/sap/ui/unified/calendar/DatesRow.js +1 -1
- package/src/sap/ui/unified/calendar/Header.js +1 -1
- package/src/sap/ui/unified/calendar/IndexPicker.js +1 -1
- package/src/sap/ui/unified/calendar/Month.js +48 -52
- package/src/sap/ui/unified/calendar/MonthPicker.js +34 -29
- package/src/sap/ui/unified/calendar/MonthsRow.js +10 -10
- package/src/sap/ui/unified/calendar/OneMonthDatesRow.js +1 -1
- package/src/sap/ui/unified/calendar/TimesRow.js +1 -1
- package/src/sap/ui/unified/calendar/YearPicker.js +53 -45
- package/src/sap/ui/unified/calendar/YearRangePicker.js +11 -11
- package/src/sap/ui/unified/library.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.unified",
|
|
3
|
-
"version": "1.111.
|
|
3
|
+
"version": "1.111.5",
|
|
4
4
|
"description": "OpenUI5 UI Library sap.ui.unified",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
"url": "https://github.com/SAP/openui5.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@openui5/sap.ui.core": "1.111.
|
|
17
|
+
"@openui5/sap.ui.core": "1.111.5"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
8
8
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
|
9
|
-
<version>1.111.
|
|
9
|
+
<version>1.111.5</version>
|
|
10
10
|
|
|
11
11
|
<documentation>Unified controls intended for both, mobile and desktop scenarios</documentation>
|
|
12
12
|
|
|
@@ -76,7 +76,7 @@ sap.ui.define([
|
|
|
76
76
|
* Basic Calendar.
|
|
77
77
|
* This calendar is used for DatePickers
|
|
78
78
|
* @extends sap.ui.core.Control
|
|
79
|
-
* @version 1.111.
|
|
79
|
+
* @version 1.111.5
|
|
80
80
|
*
|
|
81
81
|
* @constructor
|
|
82
82
|
* @public
|
|
@@ -138,14 +138,14 @@ sap.ui.define([
|
|
|
138
138
|
* If not set, the calendar type of the global configuration is used.
|
|
139
139
|
* @since 1.34.0
|
|
140
140
|
*/
|
|
141
|
-
primaryCalendarType : {type : "sap.ui.core.CalendarType", group : "Appearance"
|
|
141
|
+
primaryCalendarType : {type : "sap.ui.core.CalendarType", group : "Appearance"},
|
|
142
142
|
|
|
143
143
|
/**
|
|
144
144
|
* If set, the days are also displayed in this calendar type
|
|
145
145
|
* If not set, the dates are only displayed in the primary calendar type
|
|
146
146
|
* @since 1.34.0
|
|
147
147
|
*/
|
|
148
|
-
secondaryCalendarType : {type : "sap.ui.core.CalendarType", group : "Appearance"
|
|
148
|
+
secondaryCalendarType : {type : "sap.ui.core.CalendarType", group : "Appearance"},
|
|
149
149
|
|
|
150
150
|
/**
|
|
151
151
|
* Width of Calendar
|
|
@@ -349,11 +349,6 @@ sap.ui.define([
|
|
|
349
349
|
this._iBreakPointDesktop = Device.media._predefinedRangeSets[Device.media.RANGESETS.SAP_STANDARD_EXTENDED].points[1];
|
|
350
350
|
this._iBreakPointLargeDesktop = Device.media._predefinedRangeSets[Device.media.RANGESETS.SAP_STANDARD_EXTENDED].points[2];
|
|
351
351
|
|
|
352
|
-
// set default calendar type from configuration
|
|
353
|
-
var sCalendarType = Configuration.getCalendarType();
|
|
354
|
-
this.setProperty("primaryCalendarType", sCalendarType);
|
|
355
|
-
this.setProperty("secondaryCalendarType", sCalendarType);
|
|
356
|
-
|
|
357
352
|
this._iColumns = 1; // default columns for the calendar
|
|
358
353
|
|
|
359
354
|
// Render the monthPicker first to get the length of the current month name. The _currentPicker property will
|
|
@@ -361,12 +356,12 @@ sap.ui.define([
|
|
|
361
356
|
this.setProperty("_currentPicker", CURRENT_PICKERS.MONTH_PICKER);
|
|
362
357
|
|
|
363
358
|
// to format year with era in Japanese
|
|
364
|
-
this._oYearFormat = DateFormat.getDateInstance({format: "y", calendarType:
|
|
359
|
+
this._oYearFormat = DateFormat.getDateInstance({format: "y", calendarType: this._getPrimaryCalendarType()});
|
|
365
360
|
|
|
366
361
|
this.data("sap-ui-fastnavgroup", "true", true); // Define group for F6 handling
|
|
367
362
|
|
|
368
|
-
this._oMinDate = CalendarUtils._minDate(this.
|
|
369
|
-
this._oMaxDate = CalendarUtils._maxDate(this.
|
|
363
|
+
this._oMinDate = CalendarUtils._minDate(this._getPrimaryCalendarType());
|
|
364
|
+
this._oMaxDate = CalendarUtils._maxDate(this._getPrimaryCalendarType());
|
|
370
365
|
|
|
371
366
|
this._initializeHeader();
|
|
372
367
|
this._initializeSecondMonthHeader();
|
|
@@ -489,7 +484,7 @@ sap.ui.define([
|
|
|
489
484
|
Calendar.prototype._initializeYearRangePicker = function() {
|
|
490
485
|
var oYearRangePicker = new YearRangePicker(this.getId() + "--YRP");
|
|
491
486
|
oYearRangePicker.attachEvent("select", this._selectYearRange, this);
|
|
492
|
-
oYearRangePicker.setPrimaryCalendarType(this.
|
|
487
|
+
oYearRangePicker.setPrimaryCalendarType(this._getPrimaryCalendarType());
|
|
493
488
|
this.setAggregation("yearRangePicker", oYearRangePicker); // do not invalidate
|
|
494
489
|
};
|
|
495
490
|
|
|
@@ -509,7 +504,7 @@ sap.ui.define([
|
|
|
509
504
|
weekDays: oWeekDays
|
|
510
505
|
});
|
|
511
506
|
|
|
512
|
-
this._focusDate(CalendarDate.fromLocalJSDate(oWeekDays.getStartDate(), this.
|
|
507
|
+
this._focusDate(CalendarDate.fromLocalJSDate(oWeekDays.getStartDate(), this._getPrimaryCalendarType()), true, false, false);
|
|
513
508
|
|
|
514
509
|
if (!bExecuteDefault) {
|
|
515
510
|
oEvent.preventDefault();
|
|
@@ -542,7 +537,7 @@ sap.ui.define([
|
|
|
542
537
|
|
|
543
538
|
if (aMonths.length > 1 && oMonthDate) {
|
|
544
539
|
// for more than one month - re-render same months (if already rendered once)
|
|
545
|
-
oCalDate = CalendarDate.fromLocalJSDate(oMonthDate, this.
|
|
540
|
+
oCalDate = CalendarDate.fromLocalJSDate(oMonthDate, this._getPrimaryCalendarType());
|
|
546
541
|
} else if (aMonths.length > 1) {
|
|
547
542
|
oCalDate = _determineFirstMonthDate.call(this, this._getFocusedDate());
|
|
548
543
|
} else {
|
|
@@ -734,7 +729,7 @@ sap.ui.define([
|
|
|
734
729
|
*/
|
|
735
730
|
Calendar.prototype._setFocusedDate = function(oDate){
|
|
736
731
|
CalendarUtils._checkCalendarDate(oDate);
|
|
737
|
-
this._oFocusedDate = new CalendarDate(oDate, this.
|
|
732
|
+
this._oFocusedDate = new CalendarDate(oDate, this._getPrimaryCalendarType());
|
|
738
733
|
};
|
|
739
734
|
|
|
740
735
|
/**
|
|
@@ -785,7 +780,7 @@ sap.ui.define([
|
|
|
785
780
|
if (this.getDomRef()) {
|
|
786
781
|
// if rendered just use the date of the first month
|
|
787
782
|
var aMonths = this.getAggregation("month");
|
|
788
|
-
oStartDate = CalendarDate.fromLocalJSDate(aMonths[0].getDate(), this.
|
|
783
|
+
oStartDate = CalendarDate.fromLocalJSDate(aMonths[0].getDate(), this._getPrimaryCalendarType());
|
|
789
784
|
} else {
|
|
790
785
|
// if not rendered use the focused date
|
|
791
786
|
oStartDate = new CalendarDate(this._getFocusedDate());
|
|
@@ -897,7 +892,6 @@ sap.ui.define([
|
|
|
897
892
|
|
|
898
893
|
Calendar.prototype.setSecondaryCalendarType = function(sCalendarType){
|
|
899
894
|
|
|
900
|
-
this._bSecondaryCalendarTypeSet = true; // as property can not be empty but we use it only if set
|
|
901
895
|
this.setProperty("secondaryCalendarType", sCalendarType);
|
|
902
896
|
|
|
903
897
|
this._oYearFormatSecondary = DateFormat.getDateInstance({format: "y", calendarType: sCalendarType});
|
|
@@ -917,24 +911,22 @@ sap.ui.define([
|
|
|
917
911
|
|
|
918
912
|
};
|
|
919
913
|
|
|
914
|
+
Calendar.prototype._getPrimaryCalendarType = function(){
|
|
915
|
+
return this.getProperty("primaryCalendarType") || Configuration.getCalendarType();
|
|
916
|
+
};
|
|
917
|
+
|
|
920
918
|
/**
|
|
921
919
|
* Returns if there is secondary calendar type set and if it is different from the primary one.
|
|
922
|
-
* @returns {
|
|
920
|
+
* @returns {string} if there is secondary calendar type set and if it is different from the primary one
|
|
923
921
|
*/
|
|
924
922
|
Calendar.prototype._getSecondaryCalendarType = function(){
|
|
923
|
+
var sSecondaryCalendarType = this.getSecondaryCalendarType();
|
|
925
924
|
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
if (this._bSecondaryCalendarTypeSet) {
|
|
929
|
-
sSecondaryCalendarType = this.getSecondaryCalendarType();
|
|
930
|
-
var sPrimaryCalendarType = this.getPrimaryCalendarType();
|
|
931
|
-
if (sSecondaryCalendarType == sPrimaryCalendarType) {
|
|
932
|
-
sSecondaryCalendarType = undefined;
|
|
933
|
-
}
|
|
925
|
+
if (sSecondaryCalendarType === this._getPrimaryCalendarType()) {
|
|
926
|
+
return undefined;
|
|
934
927
|
}
|
|
935
928
|
|
|
936
929
|
return sSecondaryCalendarType;
|
|
937
|
-
|
|
938
930
|
};
|
|
939
931
|
|
|
940
932
|
/**
|
|
@@ -970,7 +962,7 @@ sap.ui.define([
|
|
|
970
962
|
*/
|
|
971
963
|
Calendar.prototype.setMinDate = function(oDate){
|
|
972
964
|
var aMonths = this.getAggregation("month"),
|
|
973
|
-
sPrimaryCalendarType = this.
|
|
965
|
+
sPrimaryCalendarType = this._getPrimaryCalendarType(),
|
|
974
966
|
iMinYear;
|
|
975
967
|
|
|
976
968
|
if (deepEqual(oDate, this.getMinDate())) {
|
|
@@ -1025,7 +1017,7 @@ sap.ui.define([
|
|
|
1025
1017
|
Calendar.prototype.setMaxDate = function(oDate){
|
|
1026
1018
|
|
|
1027
1019
|
var aMonths = this.getAggregation("month"),
|
|
1028
|
-
sPrimaryCalendarType = this.
|
|
1020
|
+
sPrimaryCalendarType = this._getPrimaryCalendarType(),
|
|
1029
1021
|
iMaxYear;
|
|
1030
1022
|
|
|
1031
1023
|
if (deepEqual(oDate, this.getMaxDate())) {
|
|
@@ -1295,7 +1287,7 @@ sap.ui.define([
|
|
|
1295
1287
|
|
|
1296
1288
|
var oCalDate;
|
|
1297
1289
|
if (aMonths.length > 1) {
|
|
1298
|
-
oCalDate = CalendarDate.fromLocalJSDate(aMonths[0].getDate(), this.
|
|
1290
|
+
oCalDate = CalendarDate.fromLocalJSDate(aMonths[0].getDate(), this._getPrimaryCalendarType());
|
|
1299
1291
|
} else {
|
|
1300
1292
|
oCalDate = this._getFocusedDate();
|
|
1301
1293
|
}
|
|
@@ -1351,7 +1343,7 @@ sap.ui.define([
|
|
|
1351
1343
|
var oHeader = this.getAggregation("header");
|
|
1352
1344
|
var iMonths = _getMonths.call(this);
|
|
1353
1345
|
|
|
1354
|
-
var oCheckDate = new CalendarDate(oDate, this.
|
|
1346
|
+
var oCheckDate = new CalendarDate(oDate, this._getPrimaryCalendarType());
|
|
1355
1347
|
|
|
1356
1348
|
if (this._iMode === 1 && iMonths > 1) {
|
|
1357
1349
|
oCheckDate = _determineFirstMonthDate.call(this, oDate);
|
|
@@ -1403,7 +1395,7 @@ sap.ui.define([
|
|
|
1403
1395
|
Calendar.prototype._togglePrevNexYearPicker = function(){
|
|
1404
1396
|
var oYearRangePicker = this.getAggregation("yearRangePicker"),
|
|
1405
1397
|
oYearPicker = this._getYearPicker(),
|
|
1406
|
-
sPrimaryType = this.
|
|
1398
|
+
sPrimaryType = this._getPrimaryCalendarType(),
|
|
1407
1399
|
oMinDate = new CalendarDate(this._oMinDate, sPrimaryType),
|
|
1408
1400
|
oMaxDate = new CalendarDate(this._oMaxDate, sPrimaryType),
|
|
1409
1401
|
oHeader = this.getAggregation("header"),
|
|
@@ -1452,7 +1444,7 @@ sap.ui.define([
|
|
|
1452
1444
|
switch (this._iMode) {
|
|
1453
1445
|
case 0: // day picker
|
|
1454
1446
|
if (iMonths > 1) {
|
|
1455
|
-
oFirstMonthDate = CalendarDate.fromLocalJSDate(this.getAggregation("month")[0].getDate(), this.
|
|
1447
|
+
oFirstMonthDate = CalendarDate.fromLocalJSDate(this.getAggregation("month")[0].getDate(), this._getPrimaryCalendarType());
|
|
1456
1448
|
oFirstMonthDate.setDate(1);
|
|
1457
1449
|
this._setFocusedDate(oFirstMonthDate);
|
|
1458
1450
|
oFocusedDate = this._getFocusedDate();
|
|
@@ -1511,7 +1503,7 @@ sap.ui.define([
|
|
|
1511
1503
|
switch (this._iMode) {
|
|
1512
1504
|
case 0: // day picker
|
|
1513
1505
|
if (iMonths > 1) {
|
|
1514
|
-
oFirstMonthDate = CalendarDate.fromLocalJSDate(this.getAggregation("month")[0].getDate(), this.
|
|
1506
|
+
oFirstMonthDate = CalendarDate.fromLocalJSDate(this.getAggregation("month")[0].getDate(), this._getPrimaryCalendarType());
|
|
1515
1507
|
oFirstMonthDate.setMonth(oFirstMonthDate.getMonth(),1);
|
|
1516
1508
|
this._setFocusedDate(oFirstMonthDate);
|
|
1517
1509
|
oFocusedDate = this._getFocusedDate();
|
|
@@ -1629,7 +1621,7 @@ sap.ui.define([
|
|
|
1629
1621
|
|
|
1630
1622
|
Calendar.prototype._getDisplayedSecondaryMonths = function(){
|
|
1631
1623
|
|
|
1632
|
-
var sPrimaryCalendarType = this.
|
|
1624
|
+
var sPrimaryCalendarType = this._getPrimaryCalendarType(),
|
|
1633
1625
|
sSecondaryCalendarType = this._getSecondaryCalendarType(),
|
|
1634
1626
|
aMonths = this.getAggregation("month"),
|
|
1635
1627
|
oFirstDate = CalendarDate.fromLocalJSDate(aMonths[0].getDate(), sPrimaryCalendarType),
|
|
@@ -1654,7 +1646,7 @@ sap.ui.define([
|
|
|
1654
1646
|
* @returns {object} two values - start and end date
|
|
1655
1647
|
*/
|
|
1656
1648
|
Calendar.prototype._getDisplayedSecondaryYears = function(){
|
|
1657
|
-
var sPrimaryCalendarType = this.
|
|
1649
|
+
var sPrimaryCalendarType = this._getPrimaryCalendarType(),
|
|
1658
1650
|
sSecondaryCalendarType = this._getSecondaryCalendarType(),
|
|
1659
1651
|
oFirstDate, oLastDate, oFocusedDate, oDate, aMonths, oYearPicker, iHalfRange;
|
|
1660
1652
|
switch (this._iMode) {
|
|
@@ -1746,7 +1738,7 @@ sap.ui.define([
|
|
|
1746
1738
|
*/
|
|
1747
1739
|
Calendar.prototype._handleFocus = function (oEvent) {
|
|
1748
1740
|
|
|
1749
|
-
var oDate = CalendarDate.fromLocalJSDate(oEvent.getParameter("date"), this.
|
|
1741
|
+
var oDate = CalendarDate.fromLocalJSDate(oEvent.getParameter("date"), this._getPrimaryCalendarType()),
|
|
1750
1742
|
bOtherMonth = oEvent.getParameter("otherMonth"),
|
|
1751
1743
|
bRestoreOldDate = oEvent.getParameter("restoreOldDate");
|
|
1752
1744
|
|
|
@@ -1787,14 +1779,14 @@ sap.ui.define([
|
|
|
1787
1779
|
aMonths = this.getAggregation("month"),
|
|
1788
1780
|
oMonth,
|
|
1789
1781
|
oMonthDate,
|
|
1790
|
-
oFirstDate = _determineFirstMonthDate.call(this, new CalendarDate(oDate, this.
|
|
1782
|
+
oFirstDate = _determineFirstMonthDate.call(this, new CalendarDate(oDate, this._getPrimaryCalendarType())),
|
|
1791
1783
|
i = 0,
|
|
1792
1784
|
bMonthContainsDate = aMonths[0].checkDateFocusable(oDate.toLocalJSDate()),
|
|
1793
1785
|
bFireStartDateChange = !bNoEvent && !bMonthContainsDate;
|
|
1794
1786
|
|
|
1795
1787
|
for (i = 0; i < aMonths.length; i++) {
|
|
1796
1788
|
oMonth = aMonths[i];
|
|
1797
|
-
oMonthDate = new CalendarDate(oFirstDate, this.
|
|
1789
|
+
oMonthDate = new CalendarDate(oFirstDate, this._getPrimaryCalendarType());
|
|
1798
1790
|
oMonthDate.setMonth(oFirstDate.getMonth() + i);
|
|
1799
1791
|
if (!bSkipFocus && CalendarUtils._isSameMonthAndYear(oMonthDate, oDate)) {
|
|
1800
1792
|
oMonth.setDate(oDate.toLocalJSDate());
|
|
@@ -1997,7 +1989,7 @@ sap.ui.define([
|
|
|
1997
1989
|
var sText;
|
|
1998
1990
|
var sYear;
|
|
1999
1991
|
var sPattern;
|
|
2000
|
-
var sPrimaryCalendarType = this.
|
|
1992
|
+
var sPrimaryCalendarType = this._getPrimaryCalendarType();
|
|
2001
1993
|
var sSecondaryCalendarType = this._getSecondaryCalendarType();
|
|
2002
1994
|
var sSecondaryMonthInfo = "";
|
|
2003
1995
|
|
|
@@ -2109,7 +2101,7 @@ sap.ui.define([
|
|
|
2109
2101
|
|
|
2110
2102
|
if (aMonths.length > 1 && oMonthDate) {
|
|
2111
2103
|
// for more than one month - re-render same months (if already rendered once)
|
|
2112
|
-
oCalDate = CalendarDate.fromLocalJSDate(oMonthDate, this.
|
|
2104
|
+
oCalDate = CalendarDate.fromLocalJSDate(oMonthDate, this._getPrimaryCalendarType());
|
|
2113
2105
|
} else if (aMonths.length > 1) {
|
|
2114
2106
|
oCalDate = _determineFirstMonthDate.call(this, this._getFocusedDate());
|
|
2115
2107
|
} else {
|
|
@@ -2138,7 +2130,7 @@ sap.ui.define([
|
|
|
2138
2130
|
};
|
|
2139
2131
|
|
|
2140
2132
|
Calendar.prototype._selectMonth = function () {
|
|
2141
|
-
var oFocusedDate = new CalendarDate(this._getFocusedDate(), this.
|
|
2133
|
+
var oFocusedDate = new CalendarDate(this._getFocusedDate(), this._getPrimaryCalendarType()),
|
|
2142
2134
|
oMonthPicker = this._getMonthPicker(),
|
|
2143
2135
|
iFocusedMonth = oMonthPicker.getProperty("_focusedMonth"),
|
|
2144
2136
|
iMonth = (iFocusedMonth || iFocusedMonth === 0) ? iFocusedMonth : oMonthPicker.getMonth(),
|
|
@@ -2183,10 +2175,10 @@ sap.ui.define([
|
|
|
2183
2175
|
* @returns {void}
|
|
2184
2176
|
*/
|
|
2185
2177
|
Calendar.prototype._selectYear = function () {
|
|
2186
|
-
var oFocusedDate = new CalendarDate(this._getFocusedDate(), this.
|
|
2178
|
+
var oFocusedDate = new CalendarDate(this._getFocusedDate(), this._getPrimaryCalendarType()),
|
|
2187
2179
|
oFocusedMonth = oFocusedDate.getMonth(),
|
|
2188
2180
|
oYearPicker = this._getYearPicker(),
|
|
2189
|
-
oDate = CalendarDate.fromLocalJSDate(oYearPicker.getDate(), this.
|
|
2181
|
+
oDate = CalendarDate.fromLocalJSDate(oYearPicker.getDate(), this._getPrimaryCalendarType());
|
|
2190
2182
|
|
|
2191
2183
|
// to keep day and month stable also for islamic date
|
|
2192
2184
|
if (!this._bActionTriggeredFromSecondHeader){
|
|
@@ -2227,7 +2219,7 @@ sap.ui.define([
|
|
|
2227
2219
|
var oYearRangePicker = this.getAggregation("yearRangePicker"),
|
|
2228
2220
|
oHeader = this.getAggregation("header"),
|
|
2229
2221
|
iRangeSize = oYearRangePicker.getRangeSize(),
|
|
2230
|
-
sPrimaryCalendarType = this.
|
|
2222
|
+
sPrimaryCalendarType = this._getPrimaryCalendarType(),
|
|
2231
2223
|
oStartDate = CalendarDate.fromLocalJSDate(oYearRangePicker.getDate(), sPrimaryCalendarType),
|
|
2232
2224
|
oEndDate = new CalendarDate(oStartDate.getYear() + iRangeSize - 1, 0, 1, sPrimaryCalendarType),
|
|
2233
2225
|
oFocusedDate = this._getFocusedDate(),
|
|
@@ -2236,9 +2228,9 @@ sap.ui.define([
|
|
|
2236
2228
|
oFocusedDate.setYear(oStartDate.getYear() + iRangeSize / 2);
|
|
2237
2229
|
oStartDate.setMonth(0, 1); // always use the first of the month to have stable year in Japanese calendar
|
|
2238
2230
|
if (oFocusedDate.isBefore(this._oMinDate)) {
|
|
2239
|
-
oFocusedDate = new CalendarDate(this._oMinDate, this.
|
|
2231
|
+
oFocusedDate = new CalendarDate(this._oMinDate, this._getPrimaryCalendarType());
|
|
2240
2232
|
} else if (oFocusedDate.isAfter(this._oMaxDate)){
|
|
2241
|
-
oFocusedDate = new CalendarDate(this._oMaxDate, this.
|
|
2233
|
+
oFocusedDate = new CalendarDate(this._oMaxDate, this._getPrimaryCalendarType());
|
|
2242
2234
|
}
|
|
2243
2235
|
this._setFocusedDate(oFocusedDate);
|
|
2244
2236
|
|
|
@@ -2255,7 +2247,7 @@ sap.ui.define([
|
|
|
2255
2247
|
Calendar.prototype._showYearRangePicker = function () {
|
|
2256
2248
|
var oYearRangePicker = this.getAggregation("yearRangePicker"),
|
|
2257
2249
|
oYearPicker = this._getYearPicker(),
|
|
2258
|
-
oRangeMidDate = CalendarDate.fromLocalJSDate(oYearPicker.getFirstRenderedDate(), this.
|
|
2250
|
+
oRangeMidDate = CalendarDate.fromLocalJSDate(oYearPicker.getFirstRenderedDate(), this._getPrimaryCalendarType());
|
|
2259
2251
|
|
|
2260
2252
|
this.setProperty("_currentPicker", CURRENT_PICKERS.YEAR_RANGE_PICKER);
|
|
2261
2253
|
|
|
@@ -2439,14 +2431,14 @@ sap.ui.define([
|
|
|
2439
2431
|
oSecondMonthHeader = this.getAggregation("secondMonthHeader"),
|
|
2440
2432
|
sFirstHeaderText = sFirstHeaderYear,
|
|
2441
2433
|
sSecondHeaderText = sSecondHeaderYear || sFirstHeaderYear,
|
|
2442
|
-
sPrimaryCalendarType = this.
|
|
2434
|
+
sPrimaryCalendarType = this._getPrimaryCalendarType();
|
|
2443
2435
|
|
|
2444
2436
|
if (this._iMode === 2 && oYearPicker) {
|
|
2445
2437
|
|
|
2446
2438
|
var oDate = oYearPicker.getProperty("_middleDate") ? oYearPicker.getProperty("_middleDate") : oYearPicker._getDate(),
|
|
2447
2439
|
oFirstDate = new CalendarDate(oDate, sPrimaryCalendarType),
|
|
2448
|
-
oMinYear = CalendarUtils._minDate(this.
|
|
2449
|
-
oMaxYear = CalendarUtils._maxDate(this.
|
|
2440
|
+
oMinYear = CalendarUtils._minDate(this._getPrimaryCalendarType()).getYear(),
|
|
2441
|
+
oMaxYear = CalendarUtils._maxDate(this._getPrimaryCalendarType()).getYear(),
|
|
2450
2442
|
oSecondDate,
|
|
2451
2443
|
sFirstYear,
|
|
2452
2444
|
sSecondYear;
|
|
@@ -2492,7 +2484,7 @@ sap.ui.define([
|
|
|
2492
2484
|
var oYearRangePicker = this.getAggregation("yearRangePicker");
|
|
2493
2485
|
|
|
2494
2486
|
if (!this._getSucessorsPickerPopup()) {
|
|
2495
|
-
switch (this.
|
|
2487
|
+
switch (this._getPrimaryCalendarType()) {
|
|
2496
2488
|
case CalendarType.Japanese:
|
|
2497
2489
|
oYearRangePicker.setColumns(1);
|
|
2498
2490
|
oYearRangePicker.setYears(4);
|
|
@@ -2539,7 +2531,7 @@ sap.ui.define([
|
|
|
2539
2531
|
function _determineFocusedDate(){
|
|
2540
2532
|
|
|
2541
2533
|
var aSelectedDates = this.getSelectedDates();
|
|
2542
|
-
var sCalendarType = this.
|
|
2534
|
+
var sCalendarType = this._getPrimaryCalendarType();
|
|
2543
2535
|
if (aSelectedDates && aSelectedDates[0] && aSelectedDates[0].getStartDate()) {
|
|
2544
2536
|
// selected dates are provided -> use first one to focus
|
|
2545
2537
|
this._oFocusedDate = CalendarDate.fromLocalJSDate(aSelectedDates[0].getStartDate(), sCalendarType);
|
|
@@ -2658,7 +2650,7 @@ sap.ui.define([
|
|
|
2658
2650
|
*/
|
|
2659
2651
|
function _determineFirstMonthDate(oDate){
|
|
2660
2652
|
|
|
2661
|
-
var oFirstDate = new CalendarDate(oDate, this.
|
|
2653
|
+
var oFirstDate = new CalendarDate(oDate, this._getPrimaryCalendarType());
|
|
2662
2654
|
oFirstDate.setDate(1);
|
|
2663
2655
|
|
|
2664
2656
|
var iMonths = _getMonths.call(this); // to use validation
|
|
@@ -2696,7 +2688,7 @@ sap.ui.define([
|
|
|
2696
2688
|
oDate;
|
|
2697
2689
|
|
|
2698
2690
|
if (aMonths.length > 1) {
|
|
2699
|
-
oDate = CalendarDate.fromLocalJSDate(aMonths[0].getDate(), this.
|
|
2691
|
+
oDate = CalendarDate.fromLocalJSDate(aMonths[0].getDate(), this._getPrimaryCalendarType());
|
|
2700
2692
|
} else {
|
|
2701
2693
|
oDate = this._getFocusedDate();
|
|
2702
2694
|
}
|
|
@@ -2717,7 +2709,7 @@ sap.ui.define([
|
|
|
2717
2709
|
function _displayDate(oDate, bSkipFocus) {
|
|
2718
2710
|
|
|
2719
2711
|
var oCalDate,
|
|
2720
|
-
sPrimaryCalendarType = this.
|
|
2712
|
+
sPrimaryCalendarType = this._getPrimaryCalendarType(),
|
|
2721
2713
|
iYear;
|
|
2722
2714
|
|
|
2723
2715
|
if (!oDate) {
|
|
@@ -21,7 +21,7 @@ sap.ui.define(['./DateTypeRange', 'sap/ui/core/format/DateFormat', 'sap/ui/core/
|
|
|
21
21
|
*
|
|
22
22
|
* Applications could inherit from this element to add own fields.
|
|
23
23
|
* @extends sap.ui.unified.DateTypeRange
|
|
24
|
-
* @version 1.111.
|
|
24
|
+
* @version 1.111.5
|
|
25
25
|
*
|
|
26
26
|
* @constructor
|
|
27
27
|
* @public
|
|
@@ -56,7 +56,7 @@ sap.ui.define([
|
|
|
56
56
|
* @class
|
|
57
57
|
* <code>CalendarDateInterval</code> only visualizes the dates in a one-line interval and allows the selection of a single day.
|
|
58
58
|
* @extends sap.ui.unified.Calendar
|
|
59
|
-
* @version 1.111.
|
|
59
|
+
* @version 1.111.5
|
|
60
60
|
*
|
|
61
61
|
* @constructor
|
|
62
62
|
* @public
|
|
@@ -65,7 +65,7 @@ sap.ui.define([
|
|
|
65
65
|
* <b>Note:</b> JavaScript Date objects are used to set and return the months, mark them as selected or as a special type.
|
|
66
66
|
* But the date part of the Date object is not used. If a Date object is returned the date will be set to the 1st of the corresponding month.
|
|
67
67
|
* @extends sap.ui.core.Control
|
|
68
|
-
* @version 1.111.
|
|
68
|
+
* @version 1.111.5
|
|
69
69
|
*
|
|
70
70
|
* @constructor
|
|
71
71
|
* @public
|
|
@@ -57,7 +57,7 @@ sap.ui.define([
|
|
|
57
57
|
* Navigation via year picker switches to the corresponding year and the same month as before the navigation.
|
|
58
58
|
*
|
|
59
59
|
* @extends sap.ui.unified.CalendarDateInterval
|
|
60
|
-
* @version 1.111.
|
|
60
|
+
* @version 1.111.5
|
|
61
61
|
*
|
|
62
62
|
* @constructor
|
|
63
63
|
* @private
|
|
@@ -39,7 +39,7 @@ sap.ui.define(['sap/ui/unified/calendar/CalendarUtils', 'sap/ui/unified/calendar
|
|
|
39
39
|
* its start date to the first date of the same week as the date the user chose.
|
|
40
40
|
*
|
|
41
41
|
* @extends sap.ui.unified.CalendarDateInterval
|
|
42
|
-
* @version 1.111.
|
|
42
|
+
* @version 1.111.5
|
|
43
43
|
*
|
|
44
44
|
* @constructor
|
|
45
45
|
* @private
|
|
@@ -25,7 +25,7 @@ sap.ui.define(['./DateRange', './library'],
|
|
|
25
25
|
* @class
|
|
26
26
|
* Date range with calendar day type information. Used to visualize special days in the Calendar.
|
|
27
27
|
* @extends sap.ui.unified.DateRange
|
|
28
|
-
* @version 1.111.
|
|
28
|
+
* @version 1.111.5
|
|
29
29
|
*
|
|
30
30
|
* @constructor
|
|
31
31
|
* @public
|