Why doesn't HTML5 datetime-local input type work with Angular date formatter

1,205 views
Skip to first unread message

Milind Khandekar

unread,
May 24, 2013, 3:38:20 PM5/24/13
to ang...@googlegroups.com
Why does this work:
          {{ path[0].controls[0].startDate | date:"yyyy-mm-dd'T'HH:mm:ss.00" }} : Shows: 2013-23-21T08:23:11.00
             <input type="datetime-local" name="starton" value="1985-04-12T23:20:50.52">: Shows a date picker control in Chrome with date filled in to be correct date (screen picture attached.)
But this doesn't:
<input type="datetime" name="starton" value={{path[0].controls[0].startDate|date:"yyyy-mm-dd'T'HH:mm:ss.00"}}>

Thanks so much for your help.
-Milind.

screen-capture.png

Chakrapani Appalabattula

unread,
Oct 5, 2013, 7:38:49 PM10/5/13
to ang...@googlegroups.com
Hi Milind - have you had any luck with this? I am running into the same issue. Please advise.

OpenNota

unread,
Oct 6, 2013, 12:10:43 AM10/6/13
to ang...@googlegroups.com
You're doing it wrong.

value="{{dt|date:&quot;yyyy-mm-dd'T'HH:mm:ss.00&quot;}}"

Milind Khandekar

unread,
Oct 6, 2013, 12:51:45 PM10/6/13
to ang...@googlegroups.com

Interesting.  Escape the quotes, I see.  I will give it a try.

Thanks,
Milind

On Oct 5, 2013 9:10 PM, "OpenNota" <open...@gmail.com> wrote:
You're doing it wrong.

value="{{dt|date:&quot;yyyy-mm-dd'T'HH:mm:ss.00&quot;}}"

--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/NjJtsusmn6Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages