soulim / ember-cli-bootstrap-datepicker

Datepicker component for Ember CLI
http://sul.im/ember-cli-bootstrap-datepicker
MIT License
68 stars 57 forks source link

Does it work with real data? #105

Closed stephanebruckert closed 6 years ago

stephanebruckert commented 6 years ago

Please note, you should use value attribute to provide a date. All examples on this page doesn't use this attribute because they don't work with real data, it's just a demo.

The only thing you don't show in your demo, doesn't work:

- `{{bootstrap-datepicker value=model.expirationDate}}`
- `{{bootstrap-datepicker value=expirationDate}}` with `expirationDate: '20/11/2010'` in the component

In both cases the initial text input is empty, but the datepicker itself works.

stephanebruckert commented 6 years ago

Just realised that in the model, expirationDate: attr('string') must be a Date:

expirationDate: attr('date')