We can dynamically pass the date in Date picker field instead of selecting the date from datepicker calender.
WebElement date_element = driver.findElement(By.id(locator));
((JavascriptExecutor)driver).executeScript("arguments[0].value=arguments[1]", date_element, date);
Initialise the variable date as string and assign the value in required format.
e.g String date ;
date = "01 May 2014"
WebElement date_element = driver.findElement(By.id(locator));
((JavascriptExecutor)driver).executeScript("arguments[0].value=arguments[1]", date_element, date);
Initialise the variable date as string and assign the value in required format.
e.g String date ;
date = "01 May 2014"