Fixes date format for date picker