fix(datepicker): memory leak fix for datepicker.