Random deselect on select in sap.ui.uinified.Calendar
OpenUI5 version: 1.107.0
Browser/version (+device/version): Chrome (latest)
Use Case: We want to have a calender, where you can selected and deselect dates which is being persisted to the backend on select/deselect.
Solution We are using a sap.ui.uinified.Calendar with singleselection = false where we bind selectedDates to a v4 oData model. When a date is clicked, it's being send to backend and vice versa it's being deleted on deselect.
Problem When a new item is being selected in Calendar, another item is getting deselected by calendar, but it's not deleted in backed. This is an unwanted side effect.
Workaround by setting bAtEnd while using create method on v4.ODataListBinding, seems to solve the issue the problem, but i believe this shoulden't be necessary, and other might not have come to this solution.
Steps to reproduce the problem:
- Bind uinified.Calender's selectedDates aggregation to a v4 model entity.
- implement Create and delete entity on select/deselect.
- Select at least 1 date in Calendar (to have a selected item from binding) and refresh browser
- Select another date
What is the expected result? Two date should now be selected.
What happens instead? Only the recent selected date show as selected, even though both are in entityset. Refreshing sets both to be selected, but selecting another date removes one again.
Other issues / enhancement suggestion unified.Calendar's Select event does not contain information about the selected DateRange, so in order to delete a specific date on (de)select you need to do some array comparison to find the item to be deleted - this seems to be a lot harder, compared to have the selected DateRange item as a parameter on the select event.