Datepicker invalid cast

Found this - Forum answer

There is no support for the DateOnly type. I converted the object to DateTime.