Bug Report
When using ionic components in vue with the alpha.13/dist the v-model binding in vue does not update the linked variable when the value in the input field changes.
With the ion-input there is a workaround because you can bind to the input event.
Unluckily the ion-datetime does not fire the input or the change event or any other useful event that you can use to update the value of the linked variable.
I think we need you to emit a change or input event when in the ion-datetime you tap on the Done button
<ion-datetime min=”2018″ max=”2030″ displayFormat=”MM/YYYY”
v-model=”inputForm.number”
v-bind:value=”inputForm.date” name=”date”
v-on:ionInput=”inputForm.date=$event.target.value”
required></ion-datetime>
…
No workaround since they do not expose suitable events to bind to.
Besides, the date picker is not my preferred solution. I went to a month
widget where you select the date directly. I used a vue component. Good luck
import VCalendar from “v-calendar”;
On Sun, Aug 5, 2018 at 1:28 PM lassesteffen ***@***.***>
wrote:
> @lguerra10 <https://github.com/lguerra10> did you find a workaround for
> ion-toggle?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#14912 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ANGc9v0L9RdMLLqQEpF8G1lLlBivyIvrks5uN0dEgaJpZM4Vk1fG>
> .
>
—
Join me on Vsee video chat. It is free <http://vsee.com/u/lpva1m>
Join me on Vsee video chat. It is free <http://vsee.com/u/lpva1m>
Incase anyone is still struggling with this, this workaround seems to work for me.
<ion-datetime v-bind:value="model" v-bind:ionChange="model = $event.target.value"> </ion-datetime>
Thanks everyone, we’re tracking this and will make sure it’s working 100%% before we leave beta. In the meantime thanks for the workarounds provided above. If you’re struggling with this you can achieve it through some of the comments above.
Hey all, v-model support for Ionic Vue is in pre-release. Interested in testing? Take a look at this gist with some info and an example of the new tag names you’ll need to use:
https://gist.github.com/mlynch/2ff3692341276ba959fea96a620097f9
Once I get some more feedback we can ship it as the next official release.