Please find below HTML code
<input class="datepicker form-text hasDatepicker" type="text" id="edit-coursedate--20" name="coursedate" value="" size="10" maxlength="128">
Please find below HTML code
<input class="datepicker form-text hasDatepicker" type="text" id="edit-coursedate--20" name="coursedate" value="" size="10" maxlength="128">
I would recommend you just to set proper value for that input. Because you are not going to test datepicker as its a jQuery stuff, but instead you need to test your system behaviour for the right date format/ for the right date range as an example. So all what you need to do is to use standart behat/mink method:
When I fill in "coursedate" with "your_date"
Or you can write your own method:
$this->getSession()->getPage()->find("css", "input[name='coursedate']")->setValue("your_date");
Basic Mink step should work here.
When I fill in "coursedate" with "your_date"
Or, if you want to write a custom method by passing the date as a paramter to it, then the 'name' attribute should work just fine here with the 'named' selector as below:
public function iFillInDateWith($your_date)
{
$this->getSession()->getPage()->find('named',array('id_or_name','coursedate'))->setValue($your_date);
}