fixing datepicker glitch