fix for datepicker and new edit flag for state