Date selector for service missing in add line / edit line form on propal/order/invoice

$dateSelector is a paramters of formAddObjectLine, if use "global $dateSelector" it is reset to 0 because not declare in outer context but already exists in the same context.