Bring the milk to a boil in a small saucepan over medium heat. While that's heating, add the chopped dates and baking soda to a large bowl.
Once boiling, pour the milk over the bowl of dates and give it a quick stir. Cover tightly with plastic wrap and let them soak for 15 minutes.
Meanwhile, preheat the oven to 350°F (180°C). Grease an 8x8-inch (20x20 cm) square baking pan and line with parchment paper, leaving a few inches of overhang.
In a medium bowl, whisk together the flour, baking powder, and salt.
Uncover the bowl of dates and use a fork to mash and mix them into a paste, leaving some small chunks for texture.
To the bowl, add the melted and cooled butter, brown sugar, eggs, and vanilla extract. Whisk until well combined.
Add the flour mixture and use a silicone spatula to fold it into the batter until a few streaks remain. Add the shredded coconut and fold everything together until just combined. Be careful not to overmix.
Transfer the batter to the prepared baking pan and smooth out the top. Bake for 40-45 minutes or until the cake is puffed and the center springs back when lightly touched.
Cool the cake in the pan for 15 minutes then transfer it to a wire rack to cool for at least 45 minutes before slicing.