Autocalculate date to custom field

I hope it works, removed console.log() debugs