proper handling of dates in preview