Closed hamedg68 closed 7 months ago
Hi @hamedg68 This is the solution: https://github.com/alireza-ab/vue-persian-datepicker/issues/4#issuecomment-847644142 the code example is for vue 2 but you can use it for vue 3.
The concept of using v-model
is to use on a component to implement a two-way binding at any time, if we use setDate()
for setting new value, actually breaks the concept of using v-model
and we can use :modelValue
instead of v-model
.
https://vuejs.org/guide/components/v-model.html
I have solved this issue on pull request
You're right. I had done this wrong from the start and didn't change it. but about your PR, did you run the test cases?
I run test cases and it doesn't run correctly. Also, you change the package.json
file in your PR.
If I want to change the v-model from out of the component, for example If the date gotten from the server, the date does not set on model-value, I think it needs to track the external changes of model-value with watch.