@fy-/fws-vue 1.0.4 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -30,7 +30,9 @@ const eventBus = useEventBus();
|
|
|
30
30
|
const currentDate = new Date();
|
|
31
31
|
const defaultDate = new Date(
|
|
32
32
|
currentDate.setFullYear(currentDate.getFullYear() - 18),
|
|
33
|
-
)
|
|
33
|
+
)
|
|
34
|
+
.toISOString()
|
|
35
|
+
.split("T")[0];
|
|
34
36
|
const state = reactive({
|
|
35
37
|
userData: {
|
|
36
38
|
Username: userData.value?.UserProfile?.Username || "",
|
|
@@ -49,6 +51,8 @@ watchEffect(() => {
|
|
|
49
51
|
Bio: userData.value?.UserProfile?.Bio || "",
|
|
50
52
|
Birthdate: userData.value?.UserProfile?.Birthdate
|
|
51
53
|
? new Date(userData.value?.UserProfile?.Birthdate.unixms)
|
|
54
|
+
.toISOString()
|
|
55
|
+
.split("T")[0]
|
|
52
56
|
: defaultDate,
|
|
53
57
|
PublicGender: userData.value?.UserProfile?.PublicGender || false,
|
|
54
58
|
PublicBio: userData.value?.UserProfile?.PublicBio || false,
|
|
@@ -24,7 +24,9 @@ const props = withDefaults(
|
|
|
24
24
|
const currentDate = new Date();
|
|
25
25
|
const defaultDate = new Date(
|
|
26
26
|
currentDate.setFullYear(currentDate.getFullYear() - 18),
|
|
27
|
-
)
|
|
27
|
+
)
|
|
28
|
+
.toISOString()
|
|
29
|
+
.split("T")[0];
|
|
28
30
|
const ageValidator = (value: any) => {
|
|
29
31
|
const today = new Date();
|
|
30
32
|
const birthDate = new Date(value);
|
|
@@ -50,6 +52,8 @@ watchEffect(() => {
|
|
|
50
52
|
Gender: userData.value?.UserProfile?.Gender || "",
|
|
51
53
|
Birthdate: userData.value?.UserProfile?.Birthdate
|
|
52
54
|
? new Date(userData.value?.UserProfile?.Birthdate.unixms)
|
|
55
|
+
.toISOString()
|
|
56
|
+
.split("T")[0]
|
|
53
57
|
: defaultDate,
|
|
54
58
|
AcceptedTerms: userData.value?.AcceptedTerms || true,
|
|
55
59
|
};
|
|
@@ -103,6 +103,9 @@ onMounted(() => {
|
|
|
103
103
|
autohide: true,
|
|
104
104
|
...props.dpOptions,
|
|
105
105
|
});
|
|
106
|
+
dpRef.value.addEventListener("changeDate", (e: any) => {
|
|
107
|
+
model.value = e.detail.date;
|
|
108
|
+
});
|
|
106
109
|
}
|
|
107
110
|
});
|
|
108
111
|
</script>
|
|
@@ -177,7 +180,7 @@ onMounted(() => {
|
|
|
177
180
|
class="block mb-2 text-sm font-medium text-fv-neutral-900 dark:text-white"
|
|
178
181
|
>{{ label ? label : placeholder }}
|
|
179
182
|
</label>
|
|
180
|
-
<div class="relative
|
|
183
|
+
<div class="relative">
|
|
181
184
|
<div
|
|
182
185
|
class="absolute inset-y-0 start-0 flex items-center ps-3.5 pointer-events-none"
|
|
183
186
|
>
|
|
@@ -201,8 +204,6 @@ onMounted(() => {
|
|
|
201
204
|
:disabled="disabled"
|
|
202
205
|
:aria-describedby="help ? `${id}-help` : id"
|
|
203
206
|
:required="req"
|
|
204
|
-
@focus="handleFocus"
|
|
205
|
-
@blur="handleBlur"
|
|
206
207
|
v-model="model"
|
|
207
208
|
ref="inputRef"
|
|
208
209
|
/>
|