Colic is not always caused by dairy products, and dairy products do not always cause colic (or any problems at all, for that matter). It is true that some babies are sensitive to the proteins in cow’s milk and can’t digest it properly. For these babies, the cow’s milk in their mother’s diet can sometimes cause colicky symptoms.
How can you know if cow's milk is causing your baby's crankiness, spitting up, and/or gas? Try cutting out cow's milk ingredients for a couple of weeks (read labels, and watch out for hidden cow's milk ingredients, like whey and casein). It can take as long as two or three weeks for the proteins to get out of your system. If you see improvement, cow's milk may be the culprit. If you don't see a change, put your partner on baby duty and go have a bowl of ice cream.