mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-10 03:19:44 +00:00
14 lines
382 B
TypeScript
14 lines
382 B
TypeScript
import timezones from "google-timezones-json";
|
|
|
|
export const createTimezoneListEl = () => {
|
|
const list = document.createElement("datalist");
|
|
list.id = "timezones";
|
|
Object.keys(timezones).forEach((key) => {
|
|
const option = document.createElement("option");
|
|
option.value = key;
|
|
option.innerText = timezones[key];
|
|
list.appendChild(option);
|
|
});
|
|
return list;
|
|
};
|