Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(input-time-zone): add time zone offset and name mode (#7913)
**Related Issue:** #7430 ## Summary This adds a `mode` property to the component to list: * Time zone offsets with (searchable) time zone groups * IANA time zone names ### API changes ```ts interface InputTimeZone { /** * Sets the time zone display and value used by the component. * * when set to "offset" (default), displays list of time zone offsets * when set to "name", displays list of IANA time zone names */ mode: "offset" | "name"; /** * The reference date used when processing offsets (affects daylight savings time). * When not provided, the reference date will be today's date. * * Note: this only affects to the `offset` mode */ referenceDate: Date | string; } ``` ### Noteworthy changes #### `mode="offset"` * wires up [`timezone-groups`](https://www.npmjs.com/package/timezone-groups) package to list cities along with each respective offset entry * city names are translated * allows searching by time zone regardless of being displayed in the label or not * E2E tests extend `Intl.DateTimeFormat` to patch missing behavior (limited subset of time zones) from Chromium v92 (bundled w/ Stencil's Puppeteer v10).
- Loading branch information