Preheat oven to 350°. Spray a 13x9-inch baking pan with nonstick baking spray with flour.
In a large bowl, combine butter and sugar. Beat at medium speed with a mixer until fluffy. Beat in vanilla. Add eggs, one at a time, beating well after each addition.
In a small bowl, combine flour, baking soda, and salt. Gradually add flour mixture to butter mixture, alternately with buttermilk, beginning and ending with flour mixture. Stir in carrot, pecans, and pineapple until well combined. Spoon batter into prepared pan. Bake for 35 to 40 minutes or until a wooden pick inserted in center comes out clean. Let cool in pan for 10 minutes. Remove from pan, and let cool completely on wire rack. Cut into squares. Drizzle with Cream Cheese Icing. Garnish with pecans if desired. Store in refrigerator.
Recipe by Southern Lady Magazine at https://southernladymagazine.com/carrot-cake-bars-recipe/