I have followed the approach mentioned at the the below link Pass data from child to parent component Angular2
but when i try to assign the value a variable in parent after emitting the event from child it throws and error saying ""Cannot set property of undefined" The error is at second line in the below code
public doSomething(date: any):void {
this.ParentDate=date;
}