bootstrap.datepicker: fixed errors related to switch on TS 0.9.5

Also improved typings