angular.js icon indicating copy to clipboard operation
angular.js copied to clipboard

intput type=[date,time,dateTimeLocal...] and ISO-8601 String

Open eratzlaff opened this issue 12 years ago • 1 comments

I use the json to populate the model and I return ISO-8601 date String and on 1.3.0.rc4 I have no call new Date(json.dateString). Why not recognize ISO-8601 String and convert it to Date automatically?

eratzlaff avatar Oct 08 '14 21:10 eratzlaff

The problem is that you would then have inconsistent types in your model:

  • when you startup you have a string
  • when the user changes something, you suddenly have a Date object

With that you need to have a check in all places that use the value in your model whether it still is a string or already a Date.

tbosch avatar Oct 09 '14 18:10 tbosch