Skip to content

Commit 067c34e

Browse files
committed
Resolve #148
1 parent eef0526 commit 067c34e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

project/pages/test/App.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<div :key = "pureValue">Pure values: {{pureValue}}</div>
77
<div :key = "pureAvailabilities">Pure av: {{pureAvailabilities}}</div>
88
<form-field type = "country" name = "country" label = "Country" />
9+
<form-field type = "date" name = "birthday" label = "Bithday" />
910

1011

1112
<form-field :name="name" :label = "name === 'username' ? 'Username' : 'Age'"/>
@@ -46,6 +47,9 @@ setInterval(() => {
4647
}, 50);
4748
4849
50+
form.oninput('birthday', v => {
51+
console.log(v)
52+
})
4953
const values = ref(0);
5054
const changes = ref({});
5155
const pureValue= ref({});

src/widgets/inputs/input-date/input-date.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ function handleUserHandInput(input: string) {
100100
function emitInput(date: Date | null) {
101101
if (props.disabled) return false;
102102
emit('update:modelValue', date ? date.toISOString() : date);
103+
104+
// Cleaning insideValue if date is NULL. Also, this step clean input value.
105+
if (!date) insideValue.value = ""
103106
}
104107
105108

0 commit comments

Comments
 (0)