Whisk together flour, baking powder, salt, and spices. Pulse almonds and hazelnuts in a food processor until very finely chopped. Add candied peels and dates, and pulse until finely chopped. Add almond paste, and pulse to combine. Add jam, and pulse. Add eggs and brown sugar, and pulse. Add flour mixture, and pulse. Transfer dough to an airtight container, and refrigerate overnight (or up to 3 days).
Preheat oven to 325 degrees. Using a 2-inch ice cream scoop ( 1/4 cup), drop dough onto parchment-lined baking sheets, spacing cookies 3 inches apart. Place 3 almonds close together on top of each cookie. Bake until golden brown, about 14 minutes. Let cool completely on sheets on wire racks.
Whisk together confectioners' sugar and milk, and brush over cooled cookies. Let stand until set. Cookies can be stored in an airtight container for up to 3 days.
To toast almonds and hazelnuts, spread them in a single layer on a rimmed baking sheet, and bake in an oven heated to 350 degrees for about 10 minutes.