Integracja spring mvc z jquery ui.

0

Witam,
Próbuje użyć kontrolki z jquery ui. Niestety u mnie po kliknięciu w pole nie wysuwa się kalendarz tak jak tutaj: https://jqueryui.com/datepicker/. Jak to prawidłowo podlinkować?
layout.jsp

<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-with, initial-scale=1.0"/>
    <link href="${pageContext.servletContext.contextPath}/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="${pageContext.servletContext.contextPath}/resources/bootstrap/css/bootstrap-theme.min.css" rel="stylesheet">
    <link href="${pageContext.servletContext.contextPath}/resources/bootstrap/css/styles.css" rel="stylesheet">

    <script type="text/javascript" src="${pageContext.servletContext.contextPath}/resources/jquery/jquery-ui.min.js"></script>
    <script type="text/javascript" src="${pageContext.servletContext.contextPath}/resources/jquery/jquery-1.11.3.min.js"></script>

    <title><tiles:getAsString name="title"/></title>
</head>

<body>
 

test.jsp

<html>
<head>
    <script type="text/javascript" src="${pageContext.servletContext.contextPath}/resources/jquery/jquery-ui.min.js"></script>
    <script type="text/javascript" src="${pageContext.servletContext.contextPath}/resources/jquery/jquery-1.11.3.min.js"></script>

    <script>
        $(function () {
            $("#datepicker").datepicker();
        });
    </script>
</head>
</html>

<div class="test">
    <p>Date: <input type="text" id="datepicker"></p>
</div>
 
    <mvc:resources mapping="/resources/**" location="/WEB-INF/resources/"/>
 

jq.PNG

0
  1. <script type="text/javascript" src="${pageContext.servletContext.contextPath}/resources/jquery/jquery-ui.min.js"></script> olaboga... wystarczy przeceż
    <script src="resources/jquery/jquery-ui.min.js" type="text/javascript"></script>
  2. Odpal firebuga i zobacz czy sie te skrypty poprawnie załadowały.
  3. Tagi html deklarowane ZA </html> to jakiś mocny WTF jak dla mnie. Copy paste mocno?
0

Z tymi znacznikami to przypadek, chciałem na szybko zobaczyć po prostu czy zadziała.

<html>
<head>
    <script type="text/javascript"
            src="${pageContext.servletContext.contextPath}/resources/jquery/jquery-ui.min.js"></script>
    <script>
        $(function () {
            $("#datepicker").datepicker();
        });
    </script>
</head>


<div class="test">
    <input type="button" onclick="alert('Hello World!')" value="Click Me!">

    <form>
        <input type="date" name="vehicle1" value="Bike"> I have a bike
        <br>
        <input type="checkbox" name="vehicle2" value="Car"> I have a car
    </form>
    <p>Date: <input type="text" id="datepicker"></p>
</div>
</html>
 

Firebug:
1.PNG
2.PNG

1 użytkowników online, w tym zalogowanych: 0, gości: 1