Fix datepicker

* Refactor CG js for tripview into it's own file.
* Datepicker hijacked to allow for custom event handling and display.