our kids (now 7 & 9) have been on board since they were babies. and now it is easy and they can't wait to go out again this year.
I think barry & the others totally hit the nail on the head: one parent sails, the other one takes care of the kids. and if you are new to sailng or your boat, you may need to go out many days without kids to feel comfortable with it. the lifejacket rule is of upmost importance - our kids don't go onto the dock or up the companionway without it on, and they don't question it. totally non-negotiable rule. when they were really young & we were doing something that required both parents, then we would put them below with some treats etc, and put the bottom board in so that we knew they wouldn't be able to get up the companionway. Ya, they cried bloody murder for the 10 minutes it took to do whatever it was, but it was safer than having them underfoot. we started with maximum 2 hours sails (closest island) in calm conditions only and would time our trips for nap time or sleep on board the night before & leave early in the am, so they would be sleeping still for most of the trip. even now our boy still takes a nap when we go out (although it never seems long enough!)
hope this helps, good luck, have fun