Checkboxes are not set to anything if not checked. If checked, you know the value - it was sent. So, you only need to check if they were set.
if(!isset($_POST['date1']) && !isset($_POST['date2']))
$error_message = 'You did not choose a date.<br>';
Note: This does not ensure a person used the form. I could hard-code my own values for date1 and date2 in my own form, submitted to your website.