Start by lining a 9x9-inch baking pan with parchment paper, allowing some overhang on the sides.
In a large mixing bowl, combine the corn flakes or brown rice krispies with the pitted Medjool dates. If using salted butter, melt it and drizzle it over the mixture for added flavor. Gently fold together.
Warm the creamy peanut butter in the microwave for about 20 seconds, then pour it over the mixture and mix thoroughly until evenly coated.
Transfer the mixture to the prepared baking pan and press it down firmly with a spatula.
Melt the semi-sweet or dark chocolate using a double boiler or microwave until smooth.
Pour the melted chocolate over the pressed mixture and spread it evenly. Sprinkle flaky sea salt on top if desired.
Refrigerate for 1-2 hours until the chocolate is set and the bars are firm.
Lift the bars out using the parchment paper overhang and cut them into squares or rectangles.