Datepicker: fix jshint and htmllint issues, code style