-
Notifications
You must be signed in to change notification settings - Fork 27.4k
fix(ngModel): support milliseconds in time and datetime #8879
Conversation
I like this change except that it means that milliseconds are always displayed. I'm wondering if it makes sense to hide them unless milliseconds are non-zero or the |
I remember checking it and seeing that chrome does not display the milliseconds (and also seconds) if it's zero. I'll take another look in the morning. |
@btford chrome indeed does the right thing when milliseconds is zero and does not display it: http://plnkr.co/edit/hYZwvnFSMBUBBHQiBvBn?p=preview In case you believe it is better we do not include the .000 fraction regardless, I added another commit to this PR that does that. (it's not pretty and I don't like it though) |
oooh I forgot about the case with |
@shahata thanks, looking into it now. |
@btford I added the |
1) milliseconds count is non-zero 2) step attribute is less than one
Rebased with #8912 |
02dc2aa
to
fd2d6c0
Compare
After looking a bit more, I think your suggestion is good. I'm going to merge just 5811560 for now. Thanks so much! |
Landed as 4b83f6c. Thanks! |
Closes #8874