Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ngModel does not work for input[type="date"] #1650

Closed

Description

@th507

Angular Version:

1.0.2

How to reproduce:

http://jsfiddle.net/rawVc/

Notes:

The documentation seems to hint that ng-model only supports input with one of these types text checkbox radio number email url

But I think if ng-model works on type="text", it should also work on newer types like type="date" and such.

Activity

  1. johnnyelwailer commented on Dec 5, 2012

    @johnnyelwailer

    it should be maybe possible to enable support for custom types?

  2. btford commented on Aug 24, 2013

    @btford
    Contributor

    As part of our effort to clean out old issues, this issue is being automatically closed since it has been inactivite for over two months.

    Please try the newest versions of Angular (1.0.8 and 1.2.0-rc.1), and if the issue persists, comment below so we can discuss it.

    Thanks!

  3. anirvan-majumdar commented on Jan 7, 2014

    @anirvan-majumdar

    Hello Brian,

    I can confirm that this issue still persists as of Angular version 1.2.3. Auto-binding on an input type='text' doesn't work. I also tried setting the value attribute to the model's date value, but that too didn't work. Here's what I was trying —

    <input type="date" id="inputStartDt" name="startDt" placeholder="Start date" ng-model="startDt"
                    value="{{ startDt | date: 'dd/MM/yyyy' }}" >
    
  4. ashclarke commented on Feb 25, 2014

    @ashclarke

    Still exists in 1.2.10. Using Chrome 33 and the same sort of code as anirvan-majumdar, except I have tried date as "yyyy-MM-dd" and "dd/MM/yyyy".

  5. caitp commented on Feb 25, 2014

    @caitp
    Contributor

    @ashclarke there is work being done on this, I think we'll probably be able to ship @Blesh's work fairly early in 1.3.

  6. ashclarke commented on Feb 25, 2014

    @ashclarke

    Thanks for the update @caitp!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions