For the topping:
Coarsely chop the dates. Place all ingredients in a saucepan and bring to a boil, stirring. Reduce the heat and continue stirring until the mixture has the consistency of a thick cream.
For the dough:
Soften the butter, mix all the ingredients in a baking bowl. It should be as homogeneous as possible, with a slightly grainy consistency.
Pour a little more than half of the dough on a buttered pan, place the topping on it and cover with the remaining dough.
Bake at medium heat for 25 minutes.