Fix editing of datetime crash