I created a custom module for a form which accepts from date and to date as user input. I would like to restrict the user from selecting a date prior to current date.
Code snippet of my code
$form['oneway']['from_date'] = array ( '#type' => 'date', '#title' => t('From Date'), '#date_year_range' => '-80:0', '#required' => TRUE, );
Can someone please help me out?