jeudi 9 juillet 2015

Binding an ember model's date attribute to month/day/year select tags

I have an Ember model with a date attribute to store a user's birthday. I would like to bind the value of this attribute to three html select tags (one for month, day, and year), but I don't know how. Since the data is stored on the model as a timestamp, it's not as simple as binding an html element straight to a model property.

I'm using ember 1.12 and ember-cli. I've looked into emberx-select for constructing and binding to the actual select and option elements, but I'm not sure how to bind each select to a distinct piece of the date attribute.

Thanks for your help.




Aucun commentaire:

Enregistrer un commentaire