diosney / angular-bootstrap-datetimepicker-directive

A wrapper directive around the bootstrap-datetimepicker component.
MIT License
69 stars 50 forks source link

Fixed ngModel issue when its used as inline. #10

Open jhalak opened 9 years ago

jhalak commented 9 years ago

When this directive was used with inline option, the ngModel variable was not updating after selection of date/time.

This may be not the best approach to fix the issue, but its just a quick fix for those who want to use it right way.

chordmemory commented 9 years ago

https://github.com/dvdcxn/angular-bootstrap-datetimepicker-directive

I forked it and bound the ng-model value to the moment date rather than the string of what is selected. This is just preferable for me as I'm providing it a moment object in the first place, it's nice for consistency. Plus, it seems like the datetimepicker "thinks" in moment, so it's a bit more consistent in that regard.