function setDateStyle(id) { document.getElementById(id).childNodes(1).style.cssText= "height:22px;width:11em; line-height:22px; border:1px solid #779a11; padding-left:3px; background-color:#fff;"; } dojo.addOnLoad(function(){ setDateStyle("issueDate"); }); <s:datetimepicker id="issueDate" name="issueDate" displayFormat="yyyy-MM-dd" />