Fixes datepicker auto choose date bug