-
New Feature
-
Resolution: Fixed
-
Normal
-
3.1.2
-
None
User Story
As an app dev, I want a convenient API to build a new item based on an existing item, so that I can create a new item to replace the existing item. Since DefaultCalendarItem is immutable, so if app devs want to update an existing item, he has to replace the original one with a new one. But in most cases, end-users just change an item's some properties e.g. begin date, not all properties. It's troublesome to always create a new item by getting all properties from the original item and passing them to the new one.
Acceptance Criteria
- provide a method public static Builder fromItem(DefaultCalendarItem item) that returns a Builder, that all properties are initialized with specified item. Then app dev can change some properties later.
Details
https://www.zkoss.org/wiki/ZK_Calendar_Essentials/CRUD_Calendar_Items#Update