With proper training you can break most of the bad habits even while intact.
Honestly you wanna wait til they are AT LEAST 1 year old, 2 would be better. At that point they are fully grown and their mind is fully developed.