updated handling of dates between view and model