Spring, Form tag based Datepicker in Jquery?

后端 未结 3 2041
广开言路
广开言路 2021-01-03 11:11

Actually in my Spring application i\'m using spring based form tag in my jsp code.

And add the functionality for this ,pr

相关标签:
3条回答
  • 2021-01-03 11:46

    looks like you are not loading the jquery.js.....u need jquery file to run the ui component..

    load jquery.js befor jquery-ui.min.js

     <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
     <script type="text/javascript" src="resources/jquery/jquery-ui.min.js"></script>
    
    0 讨论(0)
  • 2021-01-03 11:50

    It's mostly because reference issues. Please check following, preferably using Firebug or developer tools in browser

    1. jQuery UI with compatible version of jQuery is properly referenced
    2. jQuery UI CSS is referenced properly
    3. jQuery UI js is referenced

    CDN

    <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
    <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
    
    0 讨论(0)
  • 2021-01-03 11:55

    Try with the following code

    <form:input path="fromDate" cssClass="date-picker" />
    

    Your code is acceptable,

    <form:input type="text" path="fromDate" class="date-picker" />
    

    because all of the Spring MVC form tag support dynamic attributes, like HTML5 placeholder. Unless you are using older version of Spring.

    0 讨论(0)
提交回复
热议问题