yes, the problem is the format of the Max date setting
in the original you have:
<?php echo (date("Y-m-d", mktime(0, 0, 0, date("d"), date("m"), date("Y") - 18))); ?>
the mkdate function takes the date pieces in this order:
hours, minutes, seconds, month, day, year
you are not passing them in the correct order