Error 500

Undefined variable: dates