Skip to content

Commit 6e7737e

Browse files
docs(datetime): add best practices for setting value async (#3053)
1 parent dedf768 commit 6e7737e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/api/datetime.md

+4
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ While seconds, milliseconds, and time zone can be specified using the ISO 8601 d
9898

9999
If you need to present a datetime in an overlay such as a modal or a popover, we recommend using [ion-datetime-button](./datetime-button). `ion-datetime-button` should be used when space is constrained. This component displays buttons which show the current date and time values. When the buttons are tapped, the date or time pickers open in the overlay.
100100

101+
## Setting Values Asynchronously
102+
103+
If its `value` is updated programmatically after a datetime has already been created, the datetime will automatically jump to the new date. However, it is recommended to avoid updating the `value` in this way when users are able to interact with the datetime, as this could be disorienting for those currently trying to select a date. For example, if a datetime's `value` is loaded by an asyncronous process, it is recommended to hide the datetime with CSS until the value has finished updating.
104+
101105
## Date Constraints
102106

103107
### Max and Min Dates

0 commit comments

Comments
 (0)