Is it possible to implement date mask inside input field for the datepicker?
You can use custom input for your any special need. Check the docs.
https://docs.vcalendar.io/datepicker.html#using-custom-slot
Yes, I know that. But it doensn't recognize v-calendar date format.
Input with masked plugin works well with it's own v-model
V-calendar works well with it's own v-model
But they don't work together, when I use v-calendar's model for text input
I have the same problem.
I tried @nathanreyes docs exemple, and it works perfectly in a normal <input /> element.
But like @ezhkov even if vue-masked-input do it's job perfectly, i can't send event @change/@input to it.
Edit: (Why do i found my solutions just 10 min after opening an issue ^^)
<mask-input
class='form-control'
:value='inputValue'
mask='11/11/1111'
slot-scope='{ inputValue, updateValue }'
@change='updateValue($event, { formatInput: true, hidePopover: false })'
@input='updateValue($event, { formatInput: false, hidePopover: false })'
></mask-input>
I don't understand why but $event is enought rather than $event.target.value
Thank you. Your example works perfectly. It seems I didn't understand scope idea completely.
I forked your example and integrated it with Cleave.js, if anyone else will get the same problem.
How do you get the calendar popover to move to a new date that is updated while the popover is open? The fiddle above does not account for that case.
Most helpful comment
I have the same problem.
I tried @nathanreyes docs exemple, and it works perfectly in a normal
<input />element.But like @ezhkov even if
vue-masked-inputdo it's job perfectly, i can't send event@change/@inputto it.Edit: (Why do i found my solutions just 10 min after opening an issue ^^)
I don't understand why but
$eventis enought rather than$event.target.value