-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ion-datetime value doesnt change when ngModel is changed #6614
Comments
I think this issue is related to the type of the model that bind to ion-datetime. hope that may help you @keithdmoore |
@adamdbradley Can you fix this? |
@emeryao Thanks for the potential workaround. The date does get set in the model but when I change the model to point to a different item in the array, the date is not cleared in the input. |
@keithdmoore myItems: Object = [
{itemNumber:1, desc:"item1 desc", itemDate:(new Date()).toISOString()},
{itemNumber:2, desc:"item2 desc",itemDate:(new Date()).toISOString()},
{itemNumber:3, desc:"item3 desc",itemDate:(new Date()).toISOString()}
]; I think the initial value of the hope that may help you 😃 |
Like @emeryao said
In my |
Hello |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
When you have a select on the page that selects the ngModel, the value for the ngModel in ion-datetime does not change to reflect the selection change.
I was expecting the value to change since the model has changed. Basically, I expect the ion-datetime component to behave like other ion-inputs.
Steps to reproduce:
Occurs in: Ionic2
http://plnkr.co/edit/QLCot4Q06nJhH8w1iw1c?p=preview
Cordova CLI: 6.1.1
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.7
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
ios-deploy version: 1.8.5
ios-sim version: 3.1.1
OS: Mac OS X El Capitan
Node Version: v5.8.0
Xcode version: Xcode 7.3.1 Build version 7D1014
The text was updated successfully, but these errors were encountered: