A child favoring one parent is a very normal and developmentally appropriate phase. So if this isn't adding much stress to your daily life, you can also just try waiting it out. It's not unusual for this to happen for brief periods of time. And it can even flip flop between which parent is being favored.
Parental alienation is a strategy whereby one parent intentionally displays to the child unjustified negativity aimed at the other parent. The purpose of this strategy is to damage the child's relationship with the other parent and to turn the child's emotions against that other parent.
California generally prohibits parents from withholding visitation unless there is a legitimate reason. Legitimate reasons can mean more than just disliking the other parent. Typically, a court needs to agree to withhold visitation if there is concrete concern that a child is unsafe when with the other parent.
Parents who want full custody must have a significant reason to present to the court, backed with solid evidence. Examples of significant reasons are: Domestic violence from the other parent (the incident could be experienced or simply witnessed by the child) Child abuse inflicted by the other parent.
California Family Code §3010 states that a mother and father are equally entitled to the custody of their children.
Parents cannot legally withhold a child without a court order. However. That being said, if the custodial parent refuses to allow the other parent contact with the child, the other parent will be required to contact the court. It is a ``civil'' problem.