First get the calendar ID,
second using js to set calendar readonly attributes off or remove it.
Third set value for calendar using JS.
String js="document.getElementById(‘train_date‘).removeAttribute(‘readOnly‘);document.getElementById(‘train_date‘).setAttribute(‘value‘,‘2014-12-25‘);";
((JavascriptExecutor) wd).executeScript(js);
WebDriver Using JS control the Calendar inputs
原文:http://www.cnblogs.com/maycn/p/4152131.html