-
Notifications
You must be signed in to change notification settings - Fork 167
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
Input doesn't display initial value with ng-model #218
Comments
Can you create a plunkr to replicate? Is your value a date object? or a date formatted string? It should be a date object |
It is a string formatted as a date. |
needs to be a date object. Try changing it to |
@Gillardo parsing string to date object helped. And parseDate looks like this:
Thanks for advice :) |
No problem! glad its working |
Hello
I noticed a weird bug. When I load object with initial DateTime somehow it doesn't display date property.
My object date looks like this :
I thought maby I incorreclty set the format of datepicker when initializing but when I select the date and time from calendar it is stored with propper format.
<input type="text" class="form-control" ng-disabled="!(item.selected || item.requireCheckbox == false)" ng-model="item.value" datetime-picker="yyyy-MM-ddTHH:mm:ss.sss'Z'" is-open="item.showFlag" style="width: 100%" ng-style="item.value != item.oldValue && {'border':'2px solid #42aaf4'} || {'border':'1px solid #ccc'}">
If I remove datetime-picker directive from input the date from the object is displayed properly.
Please help
The text was updated successfully, but these errors were encountered: