ember-cli-bootstrap-datepicker
ember-cli-bootstrap-datepicker copied to clipboard
Add support for iso date string values
Allow incoming date values to be ISO formatted dates that can be parsed automagically by JS.
Hey @maladon! Thank you for your help :+1:
ISO formatted dates could cause some weird issues because JS converts dates into local time, e.g. you pass 2014-10-17T00:00:00
, but depending on your time zone it might be converted into 2014-10-16
(one day behind). You could see more details in https://github.com/soulim/ember-cli-bootstrap-datepicker/issues/18.
So I would like to know what was the reason for changes in this pull request. Do you have some issues with native JS dates?
Our back end services all return ISO formatted dates, and since we're not using ember data we just put the response JSON in our models. That means that our "dates" are really just strings in ISO format. This change allows those strings to work with the bootstrap datepicker.
@maladon Why don't you use computed properties? Also have a look at #42.