Form
Timezone
Published on
Description
The timezone input is a hidden field marked is="ds-input-timezone". When the component upgrades it sets the value to the IANA timezone of the browser, such as America/Toronto, so the server can store it with the submission.
The server renders it empty because it only knows UTC. Without JavaScript the field posts an empty value, which the server must treat as unchanged.
Example
Accessibility
- The field is
type="hidden", so it is not announced and takes no focus. - Do not rely on it alone for anything the person must confirm; show the detected timezone if it changes what they see.
References
Related
- JavaScript enabled — another hidden field filled on upgrade
- DataTime — formats dates for display
Variables
id— defaults totimezonename— defaults to the idvalue— defaults to empty