[ https://issues.apache.org/struts/browse/WW-2484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44836#action_44836 ]
Gabriel Belingueres commented on WW-2484: ----------------------------------------- Made a test for this. Check the line //djConfig.searchIds.push("cal0"); when commented it doesn't work (that it, the template css styles are overwritten by the original dojo styles.) when uncommented it works. Seems like a dojo bug. html test: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Dojo Date Picker Demo</title> <script type="text/javascript"> var djConfig = {isDebug: false, parseWidgets : false}; </script> <script type="text/javascript" src="../../dojo.js"></script> <script type="text/javascript"> dojo.require("dojo.widget.*"); function formSubmit(f) { alert(dojo.widget.byId("calID").getDate()); } </script> </head> <body> <table> <tbody> <tr> <td style="vertical-align:top;"> <h4>In document:</h4><input dojoType="datepicker" id="cal0" widgetId="foo" /> </td> <td style="vertical-align:top;"> <form action="" onsubmit="formSubmit(this); return false;"> <h4>Dropdown:</h4> <input dojoType="dropdowndatepicker" id="cal1" widgetId="calID" name="calendario1" displayFormat="dd/MM/yyyy" saveFormat="rfc" templateCssPath="DatePicker.css" /> <script language="JavaScript" type="text/javascript"> if (!djConfig.parseWidgets) { //uncomment this to make it work //djConfig.searchIds.push("cal0"); djConfig.searchIds.push("cal1"); } </script> <input type="submit" name="btnSubmit" value="submit"/> </form> </td> </tr> </tbody> </table> </body> </html> DatePicker.css: .datePickerContainer { width:400px; } .calendarBodyContainer thead tr td { color:red; font:bold 0.75em Helvetica, Arial, Verdana, sans-serif; text-align:center; padding:0.25em; background: url("images/dpHorizLine.gif") bottom left repeat-x; } .calendarBodyContainer tbody tr td { color:white; font:bold 0.7em Helvetica, Arial, Verdana, sans-serif; text-align:center; padding:0.4em; background: url("images/dpVertLine.gif") top right repeat-y; cursor:pointer; cursor:hand; } > Styles from templateCssPath ignored > ----------------------------------- > > Key: WW-2484 > URL: https://issues.apache.org/struts/browse/WW-2484 > Project: Struts 2 > Issue Type: Bug > Components: Plugin - Dojo Tags > Affects Versions: 2.0.11, 2.0.11.1, 2.0.12, 2.1.0, 2.1.1 > Reporter: Mike Calmus > Fix For: 2.1.3 > > > I copied the normal DatePicker.css to a local directory and made some > changes. When I use the following tag: > <s:datetimepicker name="startDate" id="startDate" > templateCssPath="/stylesheets/customDatePicker.css" > displayFormat="MM/dd/yyyy" /> > The styles specified in the modified file, though are not used. Running the > popup through FireBug (https://addons.mozilla.org/en-US/firefox/addon/1843) > shows that the modified styles are all overriden by the default styles. In > effect, those specified by the templateCssPath are ignored. > I assume this is some sort of Dojo issue. Perhaps upgrading to dojo 0.9+ > would fix it? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.