Using both languages in the same sentence or conversation is bad. Parents can discourage and even prevent their children from doing this by making sure that each of them uses one and only one language with their child at all times. The same goes for other adults who interact with the child.
Research has shown that most bilingual children mix their languages sometimes no matter how much their parents mix, for the reasons mentioned earlier. As well, most parents mix their languages when talking with their young children because it is a natural and effective way of communicating with one another and their children. Because mixing languages is common among people who are bilingual, it can be difficult and unnatural, if not impossible, to keep the languages completely separate. If most people in the children's wider community use only one language, then there is probably no reason to worry about how much parents or children mix; the children will eventual learn the monolingual patterns.