From c86006848e205193035f82b53b2f74dddb465d09 Mon Sep 17 00:00:00 2001 From: ilhan Date: Mon, 30 Sep 2019 16:18:52 +0300 Subject: [PATCH 1/3] fix(ui5-datepicker): hide weeknumber Islamic, Buddhist and Japanese calendars --- packages/main/src/DayPicker.hbs | 2 ++ packages/main/src/DayPicker.js | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/packages/main/src/DayPicker.hbs b/packages/main/src/DayPicker.hbs index c913beb7fc39..dae97dfabb7e 100644 --- a/packages/main/src/DayPicker.hbs +++ b/packages/main/src/DayPicker.hbs @@ -1,5 +1,6 @@
+ {{#if showWeekNumbers}}
{{#each _weekNumbers}}
@@ -7,6 +8,7 @@
{{/each}}
+ {{/if}}
diff --git a/packages/main/src/DayPicker.js b/packages/main/src/DayPicker.js index 2fb3fda497bc..f4e872385122 100644 --- a/packages/main/src/DayPicker.js +++ b/packages/main/src/DayPicker.js @@ -300,6 +300,10 @@ class DayPicker extends UI5Element { } } + get showWeekNumbers () { + return this.primaryCalendarType === CalendarType.Gregorian; + } + get _timestamp() { return this.timestamp !== undefined ? this.timestamp : Math.floor(new Date().getTime() / 1000); } From f09549c5052aaf185d60fc8ceec8a84bbfb61027 Mon Sep 17 00:00:00 2001 From: ilhan Date: Mon, 30 Sep 2019 16:41:24 +0300 Subject: [PATCH 2/3] eslint .. --- packages/main/src/DayPicker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/main/src/DayPicker.js b/packages/main/src/DayPicker.js index f4e872385122..fb7bcd951ed0 100644 --- a/packages/main/src/DayPicker.js +++ b/packages/main/src/DayPicker.js @@ -300,7 +300,7 @@ class DayPicker extends UI5Element { } } - get showWeekNumbers () { + get showWeekNumbers() { return this.primaryCalendarType === CalendarType.Gregorian; } From 7e1a36937adef91f3986094454be4a622190c703 Mon Sep 17 00:00:00 2001 From: ilhan Date: Tue, 1 Oct 2019 08:43:54 +0300 Subject: [PATCH 3/3] fix indentation and input sample --- packages/main/src/DayPicker.hbs | 14 +++++++------- .../webcomponents/main/samples/Input.sample.html | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/main/src/DayPicker.hbs b/packages/main/src/DayPicker.hbs index dae97dfabb7e..d0af414cc20e 100644 --- a/packages/main/src/DayPicker.hbs +++ b/packages/main/src/DayPicker.hbs @@ -1,13 +1,13 @@
{{#if showWeekNumbers}} -
- {{#each _weekNumbers}} -
- {{this}} -
- {{/each}} -
+
+ {{#each _weekNumbers}} +
+ {{this}} +
+ {{/each}} +
{{/if}}
diff --git a/packages/main/test/sap/ui/webcomponents/main/samples/Input.sample.html b/packages/main/test/sap/ui/webcomponents/main/samples/Input.sample.html index 17cc14729442..f540f62574ea 100644 --- a/packages/main/test/sap/ui/webcomponents/main/samples/Input.sample.html +++ b/packages/main/test/sap/ui/webcomponents/main/samples/Input.sample.html @@ -214,7 +214,7 @@

Input with Label