fixup to datepicker, cleaned js