2015-06-24 169 views

回答

0

你可以这样做。

<!doctypte html> 
    <html> 
    <head> 
    <meta name="layout" content="main" /> 
    <title><g:message code="User's profile" /></title> 
    <g:javascript library="jquery" /> 
    <r:require module="jquery-ui"/> 
    <script type="text/javascript"> 
    $(document).ready(function() 
    { ("#datepicker").datepicker({dateFormat: 'yy/mm/dd'}); 
    }) 
    </script>   
    </head> 
     <body> 
     <div > 
     <g:form controller="xyz" action ="abc"> 
     date : <input type="text" name="weekEndDate" id="weekEndDate" /> 
     <g:submitButton name="click" /> 
     </g:form> 
     </div> 
     </body> 
    </html> 

参考链接: - 。http://jqueryui.com/datepicker/

+0

你也将不得不做这样的事情来解析字符串到日期在控制器:yourDomain.weekEndDate =新的日期()解析('YY/MM/DD ”,params.weekEndDate) –

相关问题