locked
JQuery Datepicker is not working in my theme RRS feed

  • Question

  • User-118859203 posted

    Hi there,

    Jquery datepicker is not working in my theme. Datepicker is looking ok but problem in my theme. My code is

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>jQuery Datepicker</title>
        <link rel="stylesheet" href="../App_Themes/Default/ui.datepicker.css" type="text/css"
            media="screen" title="Smoothness" />

        <script src="../Shared/Scripts/jquery-1.2.6.min.js" type="text/javascript"></script>

        <script src="../Shared/Scripts/jquery-ui-1.5.3.min.js" type="text/javascript"></script>

        <script language="javascript" type="text/javascript">
            $(document).ready(PageLoad);

            function PageLoad() {
                $('#textBox1').datepicker();
            }
        </script>

    </head>
    <body>
        <input type="text" id="textBox1" />
    </body>
    </html>

    Any suggestion please, how to fix. Thanks for your help!

    Friday, January 11, 2019 1:26 AM

Answers

  • User-552477072 posted

    You are loading jQueryUI through Google, make sure the jQueryUI CSS theme has the same version as the jQueryUI library.

    <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
    <script src='https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js' type='text/javascript'></script>

    please check version.


    Pls don't forget to mark as answer if it helps you. Thanks!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, January 11, 2019 2:18 AM

All replies

  • User-552477072 posted

    You are loading jQueryUI through Google, make sure the jQueryUI CSS theme has the same version as the jQueryUI library.

    <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
    <script src='https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js' type='text/javascript'></script>

    please check version.


    Pls don't forget to mark as answer if it helps you. Thanks!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, January 11, 2019 2:18 AM
  • User-118859203 posted

    Yees. I was referencing the wrong version. Thanks

    Friday, January 11, 2019 2:21 AM