You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a ui5-special-date is given with a value(e.g. value="20240528" ) in the format-pattern of the parent ui5-calendar(e.g. format-pattern="yyyyMMdd" ) an javascript error occurs and the calendar doesn't render.
This calendar typescript code uses the Javascript date function
CalendarDate.js:143 Uncaught (in promise) Error: Date parameter must be a JavaScript Date object: [Invalid Date].
at CalendarDate.fromLocalJSDate (CalendarDate.js:143:1)
at Calendar.js:186:46
at Array.forEach ()
at get _specialCalendarDates (Calendar.js:181:1)
at Calendar.block0 (CalendarTemplate.lit.js:3:3983)
at executeTemplate (executeTemplate.js:12:1)
at Calendar.render (UI5Element.js:104:31)
at updateShadowRoot (updateShadowRoot.js:20:1)
at Calendar._render (UI5Element.js:580:29)
at renderImmediately (Render.js:31:1)
### Priority
None
### UI5 Web Components Version
1.24.3
### Browser
Chrome, Edge, Firefox
### Operating System
Windows
### Additional Context
Its not a big issue since an easy workaround is to just use a valid new date() format like yyyy-MM-dd
```
Organization
SAP
Declaration
I’m not disclosing any internal or sensitive information.
The text was updated successfully, but these errors were encountered:
Bug Description
If a ui5-special-date is given with a value(e.g.
value="20240528"
) in the format-pattern of the parent ui5-calendar(e.g.format-pattern="yyyyMMdd"
) an javascript error occurs and the calendar doesn't render.This calendar typescript code uses the Javascript date function
ui5-webcomponents/packages/main/src/Calendar.ts
Line 345 in 648717a
ui5-webcomponents/packages/main/src/Calendar.ts
Line 325 in 648717a
Affected Component
ui5-special-date
Expected Behaviour
The calendar special date should be usable with the custom format-pattern given
Isolated Example
No response
Steps to Reproduce
Workaround: use a valid new date() format like yyyy-MM-dd
CalendarDate.js:143 Uncaught (in promise) Error: Date parameter must be a JavaScript Date object: [Invalid Date].
at CalendarDate.fromLocalJSDate (CalendarDate.js:143:1)
at Calendar.js:186:46
at Array.forEach ()
at get _specialCalendarDates (Calendar.js:181:1)
at Calendar.block0 (CalendarTemplate.lit.js:3:3983)
at executeTemplate (executeTemplate.js:12:1)
at Calendar.render (UI5Element.js:104:31)
at updateShadowRoot (updateShadowRoot.js:20:1)
at Calendar._render (UI5Element.js:580:29)
at renderImmediately (Render.js:31:1)
Organization
SAP
Declaration
The text was updated successfully, but these errors were encountered: