Prepare the oven and pan.
Preheat the oven to 350°F. Grease a 9-by-13-inch baking dish.
Soften the dates.
Place the chopped dates in a heatproof bowl. Gently heat the buttermilk until hot but not boiling, then pour it over the dates.
Let stand for 10 minutes. Mash with a fork or blend carefully with an immersion blender. Allow the mixture to cool until lukewarm.
Cream the butter and sugar.
In a large bowl, beat the softened butter and brown sugar until light and creamy.
Add the eggs one at a time, mixing after each addition. Mix in the vanilla.
Combine the dry ingredients.
In a separate bowl, whisk together the flour, baking powder, baking soda, and salt.
Finish the batter.
Add the dry ingredients to the butter mixture in batches, alternating with the cooled date mixture. Mix gently just until combined.
Fold in the shredded carrots and optional pecans. Avoid overmixing.
Bake.
Spread the batter evenly in the prepared baking dish.
Bake for approximately 30–35 minutes, or until the center springs back lightly and a toothpick inserted into the cake comes out without wet batter. Add a few minutes if needed.
Make the caramel sauce.
While the cake bakes, combine the brown sugar, butter, and heavy cream in a saucepan.
Cook over medium heat, stirring until the butter melts and everything is combined. Bring to a gentle boil, reduce the heat to low, and simmer for 5 minutes, stirring frequently.
Remove from the heat and stir in the vanilla. The sauce will thicken slightly as it cools.
Sauce and serve.
Let the baked cake rest for about 5–10 minutes. Poke a few small holes across the surface with a skewer, then slowly pour some warm caramel sauce over the top.
Reserve the remaining sauce for serving. Cut into portions and serve warm with extra sauce and optional vanilla ice cream.