You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* An array of additional timezones to include with the standard database. Useful if there is a custom timezone, e.g. read from user data
66
-
*/
67
-
additionalTimezones: {
68
-
type:Array,
69
-
default: () => [],
70
-
},
71
-
72
-
/**
73
-
* Removed in v9 - use `modelValue` (`v-model`) instead
74
-
*
75
-
* @deprecated
76
-
*/
77
-
value: {
78
-
type:String,
79
-
default:undefined,
80
-
},
81
-
82
-
/**
83
-
* The selected timezone. Use v-model for two-way binding. The default timezone is floating, which means a time independent of timezone. See https://icalendar.org/CalDAV-Access-RFC-4791/7-3-date-and-floating-time.html for details.
84
-
*/
85
-
modelValue: {
86
-
type:String,
87
-
default:'floating',
88
-
},
89
-
90
-
/**
91
-
* ID of the inner vue-select element, can be used for labels like: `vs-${uid}__combobox`
92
-
*/
93
-
uid: {
94
-
type: [String, Number],
95
-
default: () =>`tz-${GenRandomId(5)}`,
96
-
},
97
-
},
98
-
99
-
emits: [
100
-
/**
101
-
* Removed in v9 - use `update:modelValue` (`v-model`) instead
102
-
*
103
-
* @deprecated
104
-
*/
105
-
'input',
106
-
/**
107
-
* Two-way binding of the value prop. Use v-model="selectedTimezone" for two-way binding
108
-
*/
109
-
'update:modelValue',
110
-
/** Same as update:modelValue for Vue 2 compatibility */
* An array of additional timezones to include with the standard database. Useful if there is a custom timezone, e.g. read from user data
48
+
*/
49
+
additionalTimezones?:ITimezone[]
50
+
/**
51
+
* Removed in v9 - use `modelValue` (`v-model`) instead
52
+
*
53
+
* @deprecated
54
+
*/
55
+
value?:string
56
+
/**
57
+
* The selected timezone. Use v-model for two-way binding. The default timezone is floating, which means a time independent of timezone. See https://icalendar.org/CalDAV-Access-RFC-4791/7-3-date-and-floating-time.html for details.
58
+
*/
59
+
modelValue?:string
60
+
/**
61
+
* ID of the inner vue-select element, can be used for labels like: `vs-${uid}__combobox`
62
+
*/
63
+
uid?:string
64
+
}>(), {
65
+
additionalTimezones: () => [],
66
+
value: undefined,
67
+
modelValue: 'floating',
68
+
uid: createElementId(),
69
+
})
70
+
71
+
defineEmits<{
72
+
/**
73
+
* Removed in v9 - use `update:modelValue` (`v-model`) instead
74
+
*
75
+
* @deprecated
76
+
*/
77
+
(event:'input', value:string):void
78
+
/**
79
+
* Two-way binding of the value prop. Use v-model="selectedTimezone" for two-way binding
80
+
*/
81
+
(event:'update:modelValue', value:string):void
82
+
/** Same as update:modelValue for Vue 2 compatibility */
83
+
(event:'update:model-value', value:string):void
84
+
}>()
85
+
86
+
/**
87
+
* The selected timezone.
88
+
* Use v-model for two-way binding.
89
+
* The default timezone is floating, which means a time independent of timezone. See https://icalendar.org/CalDAV-Access-RFC-4791/7-3-date-and-floating-time.html for details.
90
+
*/
91
+
const model =useModelMigration<string>('value', 'input')
92
+
93
+
const selectedTimezone =computed({
94
+
set(timezone:IRegion) {
95
+
model.value=timezone.timezoneId
119
96
},
120
-
121
-
computed: {
122
-
placeholder() {
123
-
returnt('Type to search time zone')
124
-
},
125
-
126
-
selectedTimezone() {
127
-
for (constadditionalTimezoneofthis.additionalTimezones) {
128
-
if (additionalTimezone.timezoneId===this.model) {
129
-
return additionalTimezone
97
+
get():IRegion {
98
+
for (const additionalTimezone ofprops.additionalTimezones) {
99
+
if (additionalTimezone.timezoneId===model.value) {
0 commit comments