Preheat oven to 350°F (175°C). Spread shelled pistachios on a baking sheet and toast for 8-10 minutes until fragrant. Let cool, then chop coarsely.
In a small bowl, combine chopped dates with a tablespoon of flour to prevent them from sinking during baking.
In a medium bowl, whisk together flour, baking powder, baking soda, and salt. Set aside.
In a large mixing bowl, beat softened butter and granulated sugar together on medium speed until light and fluffy, about 3-4 minutes.
Add eggs one at a time, mixing well after each addition. Mix in vanilla extract, lemon zest, and lemon juice until combined.
Gradually add dry ingredients to the butter mixture, alternating with buttermilk. Start and end with dry ingredients, mixing until just combined. Do not overmix.
Gently fold in toasted pistachios and floured dates until evenly distributed throughout the batter.
Pour batter into a greased and floured 9-inch round cake pan. Smooth the top with a spatula. Bake for 30-35 minutes, or until a toothpick inserted into the center comes out clean.
In a small bowl, whisk together powdered sugar and lemon juice until smooth. Add more lemon juice if needed to reach desired consistency.
