MakingSense / moment-datepicker

[ABANDONED REPOSITORY] The best bootstrap datepicker!
Apache License 2.0
92 stars 64 forks source link

knockout.js and changeDate does not work #20

Closed devmondo closed 11 years ago

devmondo commented 11 years ago

hi, i have followed the docs, and changeDate fires correctly but there is no ev.date returned, it is undefined

thanks win advanced.

andresmoschini commented 11 years ago

As you can see here, in my implementation of bootstrap datepicker the event does not have data, you have to read the value of the element, for example with datepicker('get') or datepicker('getAsText').

Anyway, if you are using knockout.js you have a custom binding out of the box:

devmondo commented 11 years ago

thank you man for the fast and descriptive reply,

i am already using your Knockout integration scripts, but i think now i understand what you meant, in essence all what i have to do is to subscribe to the knockout property changes and do what i want.