Skip to content
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
th507 opened this issue Dec 5, 2012 · 6 comments
Closed

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

th507 opened this issue Dec 5, 2012 · 6 comments

Comments

@th507
Copy link

th507 commented Dec 5, 2012

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.

@johnnyelwailer
Copy link

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

@btford
Copy link
Contributor

btford commented Aug 24, 2013

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!

@anirvan-majumdar
Copy link

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' }}" >

@ashclarke
Copy link

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".

@caitp
Copy link
Contributor

caitp commented Feb 25, 2014

@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.

@ashclarke
Copy link

Thanks for the update @caitp!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants