I'm currently working with a datepicker component that is part of a form in my Vue3 app using the composition API.
My challenge is how to pass a value from the datepicker component back up to the form component.
Unfortunately, I've encountered some issues while trying to solve this:
- Error:
context.emit is not a function
setup(context){
....
function emitDate(){
context.emit('chosenDate', datepickerValue.value)
}
}
- Error:
this.$emit is not a function
setup(){
....
function emitDate(){
this.$emit('chosenDate', datepickerValue.value)
}
}