If you have two coolers for a picnic, put perishable food in one and drinks in the other. People tend to open a drink cooler repeatedly. Keeping the food cooler closed between servings makes it easier to maintain its temperature. FDA recommends keeping cold picnic food at 40°F (about 4°C) or below.

Set up the food cooler first
Chill cold dishes in advance, then pack them with enough ice or frozen gel packs. A cooler thermometer helps you monitor the cold space. Put ready-to-eat foods in sealed containers, and keep raw meat or seafood in leakproof packaging apart from them. If you can use a separate cooler for raw packages, it is easier to prevent spills from contacting food you will serve without cooking.
Put the first dish you expect to use where you can reach it quickly. Keep the cooler out of direct sun when possible. Decide who will open and close it during serving so the lid does not stay open while everyone searches for a different item.
Serve a small amount and refill as needed
Instead of putting the entire bowl of a chilled salad on the table for the afternoon, bring out what you expect people to eat soon and keep the rest cold. A clean serving utensil and a separate platter for cooked food also help keep raw juices away from finished dishes.
FDA's outdoor guidance limits perishable food outside temperature control to two hours, or one hour when the outdoor temperature is above 90°F (about 32°C). For a hot picnic above that threshold, a dish set out at noon should not still be sitting out at 1:15 p.m. Putting it back in the cooler after that does not reset the clock.
If you only have one cooler
Reduce unnecessary openings and consider bringing drinks that do not need chilling. If you cannot maintain the food temperature, bring fewer perishables or choose shelf-stable foods instead. Visible ice is not a substitute for monitoring food conditions.