@openui5/sap.ui.unified 1.117.0 → 1.118.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/package.json +2 -2
  2. package/src/sap/ui/unified/.library +1 -1
  3. package/src/sap/ui/unified/Calendar.js +1 -1
  4. package/src/sap/ui/unified/CalendarAppointment.js +1 -1
  5. package/src/sap/ui/unified/CalendarDateInterval.js +1 -1
  6. package/src/sap/ui/unified/CalendarLegend.js +10 -1
  7. package/src/sap/ui/unified/CalendarLegendItem.js +1 -1
  8. package/src/sap/ui/unified/CalendarLegendRenderer.js +6 -0
  9. package/src/sap/ui/unified/CalendarMonthInterval.js +1 -1
  10. package/src/sap/ui/unified/CalendarOneMonthInterval.js +1 -1
  11. package/src/sap/ui/unified/CalendarRow.js +1 -1
  12. package/src/sap/ui/unified/CalendarTimeInterval.js +9 -2
  13. package/src/sap/ui/unified/CalendarWeekInterval.js +1 -1
  14. package/src/sap/ui/unified/ColorPicker.js +1 -1
  15. package/src/sap/ui/unified/ColorPickerPopover.js +1 -1
  16. package/src/sap/ui/unified/ContentSwitcher.js +1 -1
  17. package/src/sap/ui/unified/Currency.js +1 -1
  18. package/src/sap/ui/unified/CurrencyRenderer.js +1 -1
  19. package/src/sap/ui/unified/DateRange.js +1 -1
  20. package/src/sap/ui/unified/DateTypeRange.js +1 -1
  21. package/src/sap/ui/unified/FileUploader.js +30 -6
  22. package/src/sap/ui/unified/FileUploaderParameter.js +1 -1
  23. package/src/sap/ui/unified/FileUploaderXHRSettings.js +1 -1
  24. package/src/sap/ui/unified/Menu.js +2 -2
  25. package/src/sap/ui/unified/MenuItem.js +8 -4
  26. package/src/sap/ui/unified/MenuItemBase.js +11 -3
  27. package/src/sap/ui/unified/MenuRenderer.js +1 -1
  28. package/src/sap/ui/unified/MenuTextFieldItem.js +9 -3
  29. package/src/sap/ui/unified/Shell.js +1 -1
  30. package/src/sap/ui/unified/ShellHeadItem.js +1 -1
  31. package/src/sap/ui/unified/ShellHeadUserItem.js +1 -1
  32. package/src/sap/ui/unified/ShellLayout.js +1 -1
  33. package/src/sap/ui/unified/ShellOverlay.js +1 -1
  34. package/src/sap/ui/unified/SplitContainer.js +1 -1
  35. package/src/sap/ui/unified/calendar/CalendarUtils.js +1 -1
  36. package/src/sap/ui/unified/calendar/CustomMonthPicker.js +1 -1
  37. package/src/sap/ui/unified/calendar/DatesRow.js +1 -1
  38. package/src/sap/ui/unified/calendar/Header.js +1 -1
  39. package/src/sap/ui/unified/calendar/IndexPicker.js +1 -1
  40. package/src/sap/ui/unified/calendar/Month.js +1 -1
  41. package/src/sap/ui/unified/calendar/MonthPicker.js +1 -1
  42. package/src/sap/ui/unified/calendar/MonthsRow.js +1 -1
  43. package/src/sap/ui/unified/calendar/OneMonthDatesRow.js +1 -1
  44. package/src/sap/ui/unified/calendar/TimesRow.js +1 -1
  45. package/src/sap/ui/unified/calendar/YearPicker.js +20 -2
  46. package/src/sap/ui/unified/calendar/YearRangePicker.js +7 -1
  47. package/src/sap/ui/unified/library.js +2 -2
  48. package/src/sap/ui/unified/themes/base/Calendar.less +33 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.unified",
3
- "version": "1.117.0",
3
+ "version": "1.118.0",
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.117.0"
17
+ "@openui5/sap.ui.core": "1.118.0"
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.117.0</version>
9
+ <version>1.118.0</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.117.0
79
+ * @version 1.118.0
80
80
  *
81
81
  * @constructor
82
82
  * @public
@@ -43,7 +43,7 @@ sap.ui.define([
43
43
  *
44
44
  * Applications could inherit from this element to add own fields.
45
45
  * @extends sap.ui.unified.DateTypeRange
46
- * @version 1.117.0
46
+ * @version 1.118.0
47
47
  *
48
48
  * @constructor
49
49
  * @public
@@ -59,7 +59,7 @@ sap.ui.define([
59
59
  * @class
60
60
  * <code>CalendarDateInterval</code> only visualizes the dates in a one-line interval and allows the selection of a single day.
61
61
  * @extends sap.ui.unified.Calendar
62
- * @version 1.117.0
62
+ * @version 1.118.0
63
63
  *
64
64
  * @constructor
65
65
  * @public
@@ -56,7 +56,7 @@ sap.ui.define([
56
56
  * @extends sap.ui.core.Control
57
57
  *
58
58
  * @author SAP SE
59
- * @version 1.117.0
59
+ * @version 1.118.0
60
60
  *
61
61
  * @constructor
62
62
  * @public
@@ -356,6 +356,15 @@ sap.ui.define([
356
356
  return Object.keys(oFreeTypes);
357
357
  };
358
358
 
359
+
360
+ CalendarLegend.prototype._extractItemIdsString = function(aItemArray) {
361
+ return aItemArray.map(
362
+ function (oItem) {
363
+ return oItem.getId();
364
+ }
365
+ ).join(" ");
366
+ };
367
+
359
368
  return CalendarLegend;
360
369
 
361
370
  });
@@ -21,7 +21,7 @@ sap.ui.define(['sap/ui/core/Element', './library'],
21
21
  * @class
22
22
  * Item to be displayed in a CalendarLegend.
23
23
  * @extends sap.ui.core.Element
24
- * @version 1.117.0
24
+ * @version 1.118.0
25
25
  *
26
26
  * @constructor
27
27
  * @public
@@ -28,6 +28,9 @@ sap.ui.define(['sap/ui/core/InvisibleText'],
28
28
  aCustomItems = oLeg.getItems(),
29
29
  iCustomItemsLength = this.defineItemsLength(oLeg, aCustomItems.length),
30
30
  iCount = (aStandardItems ? aStandardItems.length : 0) + (aCustomItems ? aCustomItems.length : 0),
31
+ sOwnedItemIds = "",
32
+ aStandardItems = aStandardItems || [],
33
+ aCustomItems = aCustomItems || [],
31
34
  i,
32
35
  iIdLength,
33
36
  sColumnWidth,
@@ -37,6 +40,9 @@ sap.ui.define(['sap/ui/core/InvisibleText'],
37
40
  oRm.class("sapUiUnifiedLegend");
38
41
  oRm.attr("aria-label", oLeg._getLegendAriaLabel());
39
42
  oRm.attr("role", "list");
43
+ sOwnedItemIds = oLeg._extractItemIdsString(aStandardItems.concat(aCustomItems));
44
+ oRm.attr("aria-owns", sOwnedItemIds);
45
+
40
46
  oRm.openEnd();
41
47
 
42
48
  this.renderItemsHeader(oRm, oLeg);
@@ -65,7 +65,7 @@ sap.ui.define([
65
65
  * <b>Note:</b> UI5Date or 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.117.0
68
+ * @version 1.118.0
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.117.0
60
+ * @version 1.118.0
61
61
  *
62
62
  * @constructor
63
63
  * @private
@@ -88,7 +88,7 @@ sap.ui.define([
88
88
  * @class
89
89
  * A calendar row with a header and appointments. The Appointments will be placed in the defined interval.
90
90
  * @extends sap.ui.core.Control
91
- * @version 1.117.0
91
+ * @version 1.118.0
92
92
  *
93
93
  * @constructor
94
94
  * @public
@@ -68,7 +68,7 @@ sap.ui.define([
68
68
  * @class
69
69
  * Calendar with granularity of time items displayed in one line.
70
70
  * @extends sap.ui.core.Control
71
- * @version 1.117.0
71
+ * @version 1.118.0
72
72
  *
73
73
  * @constructor
74
74
  * @public
@@ -256,10 +256,17 @@ sap.ui.define([
256
256
  };
257
257
 
258
258
  CalendarTimeInterval.prototype._initializeHeader = function() {
259
- var oHeader = new Header(this.getId() + "--Head");
259
+ var oHeader = new Header(this.getId() + "--Head"),
260
+ oResourceBundle = Core.getLibraryResourceBundle("sap.m");
260
261
  oHeader.attachEvent("pressPrevious", this._handlePrevious, this);
261
262
  oHeader.attachEvent("pressNext", this._handleNext, this);
262
263
  this.setAggregation("header", oHeader);
264
+
265
+ if (oHeader) {
266
+ oHeader.setAriaLabelButton0(oResourceBundle.getText("DATETIMEPICKER_DATE"));
267
+ oHeader.setAriaLabelButton1(oResourceBundle.getText("MOBISCROLL_MONTH"));
268
+ oHeader.setAriaLabelButton2(oResourceBundle.getText("MOBISCROLL_YEAR"));
269
+ }
263
270
  };
264
271
 
265
272
  CalendarTimeInterval.prototype._initializeTimesRow = function() {
@@ -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.117.0
42
+ * @version 1.118.0
43
43
  *
44
44
  * @constructor
45
45
  * @private
@@ -65,7 +65,7 @@ sap.ui.define([
65
65
  * @extends sap.ui.core.Control
66
66
  *
67
67
  * @author SAP SE
68
- * @version 1.117.0
68
+ * @version 1.118.0
69
69
  *
70
70
  * @constructor
71
71
  * @public
@@ -47,7 +47,7 @@ sap.ui.define([
47
47
  * A thin wrapper over {@link sap.ui.unified.ColorPicker} allowing the latter to be used in a popover.
48
48
  *
49
49
  * @extends sap.ui.core.Control
50
- * @version 1.117.0
50
+ * @version 1.118.0
51
51
  *
52
52
  * @constructor
53
53
  * @public
@@ -31,7 +31,7 @@ sap.ui.define([
31
31
  * @extends sap.ui.core.Control
32
32
  *
33
33
  * @author SAP SE
34
- * @version 1.117.0
34
+ * @version 1.118.0
35
35
  *
36
36
  * @constructor
37
37
  * @public
@@ -58,7 +58,7 @@ sap.ui.define([
58
58
  * @extends sap.ui.core.Control
59
59
  *
60
60
  * @author SAP SE
61
- * @version 1.117.0
61
+ * @version 1.118.0
62
62
  *
63
63
  * @constructor
64
64
  * @public
@@ -14,7 +14,7 @@ sap.ui.define(["sap/m/library", "sap/ui/core/Core"],
14
14
  /**
15
15
  * Currency renderer.
16
16
  *
17
- * @version 1.117.0
17
+ * @version 1.118.0
18
18
  * @namespace
19
19
  */
20
20
  var CurrencyRenderer = {
@@ -20,7 +20,7 @@ sap.ui.define(['sap/ui/core/Element', './library', 'sap/ui/unified/calendar/Cale
20
20
  * @class
21
21
  * Date range for use in DatePicker
22
22
  * @extends sap.ui.core.Element
23
- * @version 1.117.0
23
+ * @version 1.118.0
24
24
  *
25
25
  * @constructor
26
26
  * @public
@@ -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.117.0
28
+ * @version 1.118.0
29
29
  *
30
30
  * @constructor
31
31
  * @public
@@ -65,7 +65,7 @@ sap.ui.define([
65
65
  * @implements sap.ui.core.IFormContent, sap.ui.unified.IProcessableBlobs
66
66
  *
67
67
  * @author SAP SE
68
- * @version 1.117.0
68
+ * @version 1.118.0
69
69
  *
70
70
  * @constructor
71
71
  * @public
@@ -2072,11 +2072,35 @@ sap.ui.define([
2072
2072
  if (this.oBrowse && this.oBrowse.$().length) {
2073
2073
  $browse = this.oBrowse.$();
2074
2074
  $browse.attr("type', 'button"); // The default type of button is submit that's why on click of label there are submit of the form. This way we are avoiding the submit of form.
2075
- $browse.off("click").on("click", function(oEvent) {
2076
- oEvent.preventDefault();
2077
- oEvent.stopPropagation();
2078
- this.FUEl.click(); // The default behaviour on click on label is to open "open file" dialog. The only way to attach click event that is transferred from the label to the button is this way. AttachPress and attachTap don't work in this case.
2079
- }.bind(this));
2075
+ // exapnd to multiple event types listening
2076
+
2077
+ var oEvents = {
2078
+ "click": (oEvent) => {
2079
+ oEvent.preventDefault();
2080
+ oEvent.stopPropagation();
2081
+ this.FUEl.click(); // The default behaviour on click on label is to open "open file" dialog. The only way to attach click event that is transferred from the label to the button is this way. AttachPress and attachTap don't work in this case.
2082
+ },
2083
+ dragover: (oEvent) => oEvent.preventDefault(),
2084
+ dragenter: (oEvent) => oEvent.preventDefault(),
2085
+ drop: (oEvent) => {
2086
+ oEvent.preventDefault();
2087
+ var aFileList = oEvent.originalEvent.dataTransfer.files;
2088
+ // TODO: enable directory drag and drop
2089
+ if ((!this.getMultiple() && aFileList.length > 1) || this.getDirectory()) {
2090
+ return;
2091
+ }
2092
+
2093
+ this.oFileUpload.files = aFileList;
2094
+ var oChangeEvent = {
2095
+ target: {
2096
+ files: aFileList
2097
+ }
2098
+ };
2099
+ this.handlechange(oChangeEvent);
2100
+ }
2101
+ };
2102
+
2103
+ $browse.off(oEvents).on(oEvents);
2080
2104
  }
2081
2105
  };
2082
2106
 
@@ -22,7 +22,7 @@ sap.ui.define(['sap/ui/core/Element', './library'],
22
22
  * @extends sap.ui.core.Element
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.117.0
25
+ * @version 1.118.0
26
26
  *
27
27
  * @constructor
28
28
  * @public
@@ -20,7 +20,7 @@ sap.ui.define(['sap/ui/core/Element', './library'],
20
20
  * @extends sap.ui.core.Element
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.117.0
23
+ * @version 1.118.0
24
24
  *
25
25
  * @constructor
26
26
  * @since 1.52
@@ -61,7 +61,7 @@ sap.ui.define([
61
61
  * @implements sap.ui.core.IContextMenu
62
62
  *
63
63
  * @author SAP SE
64
- * @version 1.117.0
64
+ * @version 1.118.0
65
65
  * @since 1.21.0
66
66
  *
67
67
  * @constructor
@@ -238,7 +238,7 @@ sap.ui.define([
238
238
  Menu.prototype.invalidate = function(oOrigin){
239
239
  if (oOrigin instanceof MenuItemBase && this.getDomRef()) {
240
240
  this._delayedRerenderItems();
241
- } else {
241
+ } else if (this.oPopup && this.oPopup.isOpen()) {
242
242
  Control.prototype.invalidate.apply(this, arguments);
243
243
  }
244
244
  };
@@ -23,7 +23,7 @@ sap.ui.define(['sap/ui/core/IconPool', './MenuItemBase', './library', 'sap/ui/co
23
23
  * @extends sap.ui.unified.MenuItemBase
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.117.0
26
+ * @version 1.118.0
27
27
  * @since 1.21.0
28
28
  *
29
29
  * @constructor
@@ -59,7 +59,8 @@ sap.ui.define(['sap/ui/core/IconPool', './MenuItemBase', './library', 'sap/ui/co
59
59
  MenuItem.prototype.render = function(oRenderManager, oItem, oMenu, oInfo){
60
60
  var rm = oRenderManager,
61
61
  oSubMenu = oItem.getSubmenu(),
62
- bIsEnabled = oItem.getEnabled();
62
+ bIsEnabled = oItem.getEnabled(),
63
+ oIcon;
63
64
 
64
65
  rm.openStart("li", oItem);
65
66
 
@@ -106,12 +107,15 @@ sap.ui.define(['sap/ui/core/IconPool', './MenuItemBase', './library', 'sap/ui/co
106
107
  rm.openEnd();
107
108
  rm.close("div");
108
109
 
109
- if (oItem.getIcon()) {
110
+ if (oItem.getIcon() && oItem._getIcon) {
110
111
  // icon/check column
111
112
  rm.openStart("div");
112
113
  rm.class("sapUiMnuItmIco");
113
114
  rm.openEnd();
114
- rm.icon(oItem.getIcon(), null, {title: null});
115
+
116
+ oIcon = oItem._getIcon(oItem);
117
+ rm.renderControl(oIcon);
118
+
115
119
  rm.close("div");
116
120
  }
117
121
 
@@ -5,8 +5,8 @@
5
5
  */
6
6
 
7
7
  // Provides control sap.ui.unified.MenuItemBase.
8
- sap.ui.define(['sap/ui/core/Element', './library'],
9
- function(Element, library) {
8
+ sap.ui.define(['sap/ui/core/Element', './library', 'sap/ui/core/IconPool'],
9
+ function(Element, library, IconPool) {
10
10
  "use strict";
11
11
 
12
12
 
@@ -23,7 +23,7 @@ sap.ui.define(['sap/ui/core/Element', './library'],
23
23
  * @extends sap.ui.core.Element
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.117.0
26
+ * @version 1.118.0
27
27
  * @since 1.21.0
28
28
  *
29
29
  * @constructor
@@ -159,6 +159,14 @@ sap.ui.define(['sap/ui/core/Element', './library'],
159
159
  oEvent.preventDefault(); //IE focuses the address bar
160
160
  };
161
161
 
162
+
163
+ MenuItemBase.prototype._getIcon = function(oItem) {
164
+ return IconPool.createControlByURI({
165
+ src: oItem.getIcon(),
166
+ useIconTooltip: false
167
+ });
168
+ };
169
+
162
170
  MenuItemBase.prototype.onsaphide = MenuItemBase.prototype.onsapshow;
163
171
 
164
172
  return MenuItemBase;
@@ -15,7 +15,7 @@ sap.ui.define(["sap/ui/core/Configuration"],
15
15
  * Menu renderer.
16
16
  * @author SAP - TD Core UI&AM UI Infra
17
17
  *
18
- * @version 1.117.0
18
+ * @version 1.118.0
19
19
  * @namespace
20
20
  */
21
21
  var MenuRenderer = {
@@ -52,7 +52,7 @@ sap.ui.define([
52
52
  * @extends sap.ui.unified.MenuItemBase
53
53
  *
54
54
  * @author SAP SE
55
- * @version 1.117.0
55
+ * @version 1.118.0
56
56
  * @since 1.21.0
57
57
  *
58
58
  * @constructor
@@ -91,7 +91,8 @@ sap.ui.define([
91
91
  MenuTextFieldItem.prototype.render = function(oRenderManager, oItem, oMenu, oInfo){
92
92
  var rm = oRenderManager,
93
93
  bIsEnabled = oMenu.checkEnabled(oItem),
94
- itemId = oItem.getId();
94
+ itemId = oItem.getId(),
95
+ oIcon;
95
96
 
96
97
  rm.openStart("li", oItem);
97
98
  if (oItem.getVisible()) {
@@ -127,7 +128,11 @@ sap.ui.define([
127
128
  if (oItem.getIcon()) {
128
129
  // icon/check column
129
130
  rm.openStart("div").class("sapUiMnuItmIco").openEnd();
130
- rm.icon(oItem.getIcon(), null, {title: null});
131
+
132
+ oIcon = oItem._getIcon(oItem);
133
+
134
+ rm.renderControl(oIcon);
135
+
131
136
  rm.close("div");
132
137
  }
133
138
 
@@ -139,6 +144,7 @@ sap.ui.define([
139
144
  rm.openStart("div", itemId + "-str").class("sapUiMnuTfItmStretch").openEnd().close("div"); // Helper to strech the width if needed
140
145
  rm.openStart("div").class("sapUiMnuTfItemWrppr").openEnd();
141
146
  rm.voidStart("input", itemId + "-tf").attr("tabindex", "-1");
147
+ rm.attr("role", "textbox");
142
148
  if (oItem.getValue()) {
143
149
  rm.attr("value", oItem.getValue());
144
150
  }
@@ -25,7 +25,7 @@ sap.ui.define(['./ShellHeader', './ShellLayout', './library', './ShellRenderer']
25
25
  * @extends sap.ui.unified.ShellLayout
26
26
  *
27
27
  * @author SAP SE
28
- * @version 1.117.0
28
+ * @version 1.118.0
29
29
  *
30
30
  * @constructor
31
31
  * @public
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @extends sap.ui.core.Element
29
29
  *
30
30
  * @author SAP SE
31
- * @version 1.117.0
31
+ * @version 1.118.0
32
32
  *
33
33
  * @constructor
34
34
  * @public
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @extends sap.ui.core.Element
28
28
  *
29
29
  * @author SAP SE
30
- * @version 1.117.0
30
+ * @version 1.118.0
31
31
  *
32
32
  * @constructor
33
33
  * @public
@@ -50,7 +50,7 @@ sap.ui.define([
50
50
  * @extends sap.ui.core.Control
51
51
  *
52
52
  * @author SAP SE
53
- * @version 1.117.0
53
+ * @version 1.118.0
54
54
  *
55
55
  * @constructor
56
56
  * @public
@@ -43,7 +43,7 @@ sap.ui.define([
43
43
  * @extends sap.ui.core.Control
44
44
  *
45
45
  * @author SAP SE
46
- * @version 1.117.0
46
+ * @version 1.118.0
47
47
  *
48
48
  * @constructor
49
49
  * @public
@@ -34,7 +34,7 @@ sap.ui.define([
34
34
  * @extends sap.ui.core.Control
35
35
  *
36
36
  * @author SAP SE
37
- * @version 1.117.0
37
+ * @version 1.118.0
38
38
  *
39
39
  * @constructor
40
40
  * @public
@@ -233,7 +233,7 @@ sap.ui.define([
233
233
  * If a given date is in the beginning of January (e.g. Friday, 2 Jan 2015, week 1), the function will return
234
234
  * week start date in the previous year(e.g. Sunday, 28 Dec 2014, week 53).
235
235
  *
236
- * @returns {Date} first date of the same week as the given <code>oDate</code> in local timezone.
236
+ * @returns {Date} first date of the same week as the given <code>oDate</code> in UTC timezone.
237
237
  * @public
238
238
  */
239
239
  CalendarUtils.getFirstDateOfWeek = function (oDate, oWeekConfig) {
@@ -86,7 +86,7 @@ sap.ui.define([
86
86
  oYearPicker = this._getYearPicker(),
87
87
  oFocusedDate = this._getFocusedDate();
88
88
 
89
- oFocusedDate.setYear(oYearPicker.getYear());
89
+ oFocusedDate.setYear(oYearPicker.getDate().getFullYear());
90
90
  oMonthPicker._setYear(oFocusedDate.getYear());
91
91
  oMonthPicker._setDate(oFocusedDate);
92
92
 
@@ -35,7 +35,7 @@ sap.ui.define([
35
35
  * If used inside the calendar the properties and aggregation are directly taken from the parent
36
36
  * (To not duplicate and sync DateRanges and so on...)
37
37
  * @extends sap.ui.unified.calendar.Month
38
- * @version 1.117.0
38
+ * @version 1.118.0
39
39
  *
40
40
  * @constructor
41
41
  * @public
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  *
28
28
  * <b>Note:</b> This is used inside the calendar. Not for standalone usage
29
29
  * @extends sap.ui.core.Control
30
- * @version 1.117.0
30
+ * @version 1.118.0
31
31
  *
32
32
  * @constructor
33
33
  * @public
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * This control serves for picking an item from a grid with items which are relative periods in Plannig Calendar.
33
33
  * This is used inside the sap.m.PlanningCalendar relative views. Not for stand alone usage.
34
34
  * @extends sap.ui.core.Control
35
- * @version 1.117.0
35
+ * @version 1.118.0
36
36
  *
37
37
  * @constructor
38
38
  * @private
@@ -79,7 +79,7 @@ sap.ui.define([
79
79
  * If used inside the calendar the properties and aggregation are directly taken from the parent
80
80
  * (To not duplicate and sync DateRanges and so on...)
81
81
  * @extends sap.ui.core.Control
82
- * @version 1.117.0
82
+ * @version 1.118.0
83
83
  *
84
84
  * @constructor
85
85
  * @public
@@ -55,7 +55,7 @@ sap.ui.define([
55
55
  * renders a MonthPicker with ItemNavigation
56
56
  * This is used inside the calendar. Not for stand alone usage
57
57
  * @extends sap.ui.core.Control
58
- * @version 1.117.0
58
+ * @version 1.118.0
59
59
  *
60
60
  * @constructor
61
61
  * @public
@@ -64,7 +64,7 @@ sap.ui.define([
64
64
  * The MontsRow works with UI5Date or JavaScript Date objects, but only the month and the year are used to display and interact.
65
65
  * As representation for a month, the 1st of the month will always be returned in the API.
66
66
  * @extends sap.ui.core.Control
67
- * @version 1.117.0
67
+ * @version 1.118.0
68
68
  *
69
69
  * @constructor
70
70
  * @public
@@ -34,7 +34,7 @@ sap.ui.define([
34
34
  * Other usages are not supported.
35
35
  *
36
36
  * @extends sap.ui.unified.calendar.DatesRow
37
- * @version 1.117.0
37
+ * @version 1.118.0
38
38
  *
39
39
  * @constructor
40
40
  * @private
@@ -61,7 +61,7 @@ sap.ui.define([
61
61
  *
62
62
  * The TimesRow works with UI5Date or JavaScript Date objects.
63
63
  * @extends sap.ui.core.Control
64
- * @version 1.117.0
64
+ * @version 1.118.0
65
65
  *
66
66
  * @constructor
67
67
  * @public
@@ -17,6 +17,7 @@ sap.ui.define([
17
17
  'sap/ui/core/library',
18
18
  'sap/ui/core/Locale',
19
19
  'sap/ui/core/LocaleData',
20
+ "sap/ui/core/date/UI5Date",
20
21
  "./YearPickerRenderer",
21
22
  "sap/ui/events/KeyCodes",
22
23
  "sap/ui/thirdparty/jquery",
@@ -33,6 +34,7 @@ sap.ui.define([
33
34
  coreLibrary,
34
35
  Locale,
35
36
  LocaleData,
37
+ UI5Date,
36
38
  YearPickerRenderer,
37
39
  KeyCodes,
38
40
  jQuery,
@@ -60,7 +62,7 @@ sap.ui.define([
60
62
  * As in all date-time controls, all pubic JS Date objects that are given (e.g. <code>setDate()</code>) or read
61
63
  * (e.g. <code>getFirstRenderedDate</code>) with values which are considered as date objects in browser(local) timezone.
62
64
  * @extends sap.ui.core.Control
63
- * @version 1.117.0
65
+ * @version 1.118.0
64
66
  *
65
67
  * @constructor
66
68
  * @public
@@ -151,6 +153,9 @@ sap.ui.define([
151
153
  /* eslint-disable no-lonely-if */
152
154
 
153
155
  YearPicker.prototype.init = function(){
156
+ var oInitialDate = UI5Date.getInstance();
157
+ oInitialDate.setFullYear(2000);
158
+ this.setProperty("date", oInitialDate);
154
159
  // to format year with era in Japanese
155
160
  this._oFormatYyyymmdd = DateFormat.getInstance({pattern: "yyyyMMdd", calendarType: CalendarType.Gregorian});
156
161
 
@@ -181,6 +186,12 @@ sap.ui.define([
181
186
  return this.getDomRef() && this._oItemNavigation.getItemDomRefs()[this._iSelectedIndex];
182
187
  };
183
188
 
189
+ /**
190
+ * Sets year for the YearPicker.
191
+ * @deprecated as of version 1.34, replaced by <code>setDate/code>
192
+ * @param {int} iCount The counter to be set to
193
+ * @returns {this} this for chaining
194
+ */
184
195
  YearPicker.prototype.setYear = function(iYear){
185
196
 
186
197
  // no rerendering needed, just select new year or update years
@@ -230,6 +241,9 @@ sap.ui.define([
230
241
  oCalDate.setMonth(0, 1);
231
242
 
232
243
  this.setProperty("date", oDate);
244
+ /**
245
+ * @deprecated As of version 1.34
246
+ */
233
247
  this.setProperty("year", oCalDate.getYear());
234
248
  this._oDate = oCalDate;
235
249
 
@@ -256,7 +270,7 @@ sap.ui.define([
256
270
  YearPicker.prototype._getDate = function(){
257
271
 
258
272
  if (!this._oDate) {
259
- var iYear = this.getYear();
273
+ var iYear = this.getDate().getFullYear();
260
274
  this._oDate = new CalendarDate(iYear, 0, 1, this._getPrimaryCalendarType());
261
275
  }
262
276
 
@@ -700,6 +714,10 @@ sap.ui.define([
700
714
  // if rendering happens, the year picker will immediately render the beginning of the interval in the middle
701
715
  var bSuppressInvalidate = true;
702
716
  }
717
+
718
+ /**
719
+ * @deprecated As of version 1.34
720
+ */
703
721
  this.setProperty("year", oFocusedDate.getYear(), bSuppressInvalidate);
704
722
  this.setProperty("date", oFocusedDate.toLocalJSDate(), bSuppressInvalidate);
705
723
 
@@ -45,7 +45,7 @@ sap.ui.define([
45
45
  * @extends sap.ui.unified.calendar.YearPicker
46
46
  *
47
47
  * @author SAP SE
48
- * @version 1.117.0
48
+ * @version 1.118.0
49
49
  *
50
50
  * @constructor
51
51
  * @private
@@ -96,6 +96,9 @@ sap.ui.define([
96
96
  oCalDate.setMonth(0, 1);
97
97
 
98
98
  this.setProperty("date", oRangeMidDate);
99
+ /**
100
+ * @deprecated As of version 1.34
101
+ */
99
102
  this.setProperty("year", oCalDate.getYear());
100
103
  this._oDate = oCalDate;
101
104
 
@@ -198,6 +201,9 @@ sap.ui.define([
198
201
  }
199
202
 
200
203
  this.setProperty("date", oDate.toLocalJSDate());
204
+ /**
205
+ * @deprecated As of version 1.34
206
+ */
201
207
  this.setProperty("year", oDate.getYear());
202
208
 
203
209
  return true;
@@ -28,13 +28,13 @@ sap.ui.define([
28
28
  * @namespace
29
29
  * @alias sap.ui.unified
30
30
  * @author SAP SE
31
- * @version 1.117.0
31
+ * @version 1.118.0
32
32
  * @since 1.28
33
33
  * @public
34
34
  */
35
35
  var thisLib = sap.ui.getCore().initLibrary({
36
36
  name : "sap.ui.unified",
37
- version: "1.117.0",
37
+ version: "1.118.0",
38
38
  dependencies : ["sap.ui.core"],
39
39
  designtime: "sap/ui/unified/designtime/library.designtime",
40
40
  types: [
@@ -193,7 +193,6 @@ html.sap-desktop .sapUiCalHead > button.sapUiCalDsbl:focus,
193
193
  .sapUiCalMonthView,
194
194
  .sapUiCalMonthPicker,
195
195
  .sapUiCalYearPicker {
196
- width: 14em;
197
196
  display: inline-block;
198
197
  width: 19rem; /* +1rem padding left and right = 320 px*/
199
198
  }
@@ -459,6 +458,38 @@ html.sap-desktop .sapUiCalHead > button.sapUiCalDsbl:focus,
459
458
  }
460
459
  }
461
460
 
461
+ .sapUiSizeCozy {
462
+ .sapUiCal {
463
+ min-width: 19.9rem;
464
+ padding-top: 0.5rem;
465
+ .sapUiCalMonthView .sapUiCalWH,
466
+ .sapUiCalMonthView .sapUiCalItem,
467
+ .sapUiCalMonthView .sapUiCalWeekNum{
468
+ max-width: 2.25rem;
469
+ }
470
+
471
+ div[role=row] {
472
+ display: flex;
473
+ justify-content: space-between;
474
+ }
475
+ .sapUiCalHeadNext {
476
+ right: 0;
477
+ }
478
+ .sapUiCalHeadPrev {
479
+ left: 0;
480
+ }
481
+ }
482
+ .sapUiCal .sapUiCalMonthView,
483
+ .sapUiCal .sapUiCalRow {
484
+ padding-left: 0rem;
485
+ padding-right: 0rem;
486
+ }
487
+ .sapUiCal .sapUiCalMonthView {
488
+ padding-bottom: 0.5rem;
489
+ }
490
+
491
+ }
492
+
462
493
  .sapUiSizeCompact .sapUiCalMonthPicker.sapUiCalMonthSecType,
463
494
  .sapUiSizeCompact .sapUiCalYearPicker.sapUiCalMonthSecType {
464
495
  .sapUiCalItem {
@@ -483,7 +514,7 @@ html.sap-desktop .sapUiCalHead > button.sapUiCalDsbl:focus,
483
514
 
484
515
  .sapUiCal:not(.sapUiCalInt){
485
516
  width: 20rem;
486
- min-width: 20rem;
517
+ min-width: 19.9rem;
487
518
  }
488
519
 
489
520
  .sapUiCalMulti:not(.sapUiCalInt){