Skip to content

Commit

Permalink
Merge pull request #61 from khems/patch-1
Browse files Browse the repository at this point in the history
Prevent automatic formatting before user has finished typing date (Issue #56)
  • Loading branch information
bttlvd authored Jan 19, 2022
2 parents d60444a + 8b6e555 commit 9f21b00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/datepicker/Datepicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ export default defineComponent({
new Date(),
{ locale: props.locale }
)
if (isValid(parsedDate)) {
if (isValid(parsedDate) && input.value.length === props.inputFormat.length) {
input.value = inputRef.value!.value
emit('update:modelValue', parsedDate)
}
Expand Down

0 comments on commit 9f21b00

Please sign in to comment.