migrated the date picker (ugly code)