For the California Adventure, it depends on if you will be traveling with kids and what ages they are. If they are under 7 I wouldn't bother going to the California Adventure. For Disneyland, I'd spend a good three full days to see everything calmly with good use of fastpass. Stay on site or in walking distance for best use of the parks, it's a hassle to have to shuttle bus it to hotels far from the Parks. We usually stay at a hotel nearby (Fairfield Inn or Westcoast Anaheim) and go early in the morning and take a break around 2pm and return to the Park at 5-6 for the night. We get a three-day flex passport and have a great time.
good luck