It all depends on how much you want to see and if you are bringing kids with you. Oh, and what time of year you go too!
My DH and I went last fall w/o the kids and right before American Thanksgiving. The park was so quiet. No wait for rides, no lines for characters, so we did the park pretty fast. Two days were plenty of time for us.
In general I would say that you could see it all in 3 days.
After having been to WDW so many times I was surprised at how small and intimate Disneyland was. Very charming, you’ll love it. We stayed at the Disneyland Hotel and we walked everywhere quite easily.
However, California itself has so much to offer, you could spend an endless amount of time exploring outside of Disney as well!!