fix bug: patchy datepicker that works on all browsers