2019-04-11 05:14:34 -04:00
|
|
|
import ComboBoxComponent from "select-kit/components/combo-box";
|
|
|
|
|
|
|
|
export default ComboBoxComponent.extend({
|
|
|
|
pluginApiIdentifiers: ["timezone-input"],
|
2020-02-03 08:22:14 -05:00
|
|
|
classNames: ["timezone-input"],
|
2019-04-11 05:14:34 -04:00
|
|
|
|
2020-02-03 08:22:14 -05:00
|
|
|
selectKitOptions: {
|
|
|
|
filterable: true,
|
|
|
|
allowAny: false,
|
|
|
|
},
|
2019-04-11 05:14:34 -04:00
|
|
|
|
2022-02-02 17:41:42 -05:00
|
|
|
get nameProperty() {
|
|
|
|
return this.isLocalized ? "name" : null;
|
|
|
|
},
|
|
|
|
|
|
|
|
get valueProperty() {
|
|
|
|
return this.isLocalized ? "value" : null;
|
|
|
|
},
|
|
|
|
|
|
|
|
get content() {
|
|
|
|
return this.isLocalized ? moment.tz.localizedNames() : moment.tz.names();
|
|
|
|
},
|
|
|
|
|
|
|
|
get isLocalized() {
|
|
|
|
return (
|
|
|
|
moment.locale() !== "en" && typeof moment.tz.localizedNames === "function"
|
|
|
|
);
|
|
|
|
},
|
2019-04-11 05:14:34 -04:00
|
|
|
});
|