trentrichardson / jQuery-Timepicker-Addon

Adds a timepicker to jQueryUI Datepicker
http://trentrichardson.com/examples/timepicker/
MIT License
2.66k stars 1.05k forks source link

CRIT: Minimal example not working #708

Open mcd-php opened 10 years ago

mcd-php commented 10 years ago

I have an old and long-grown web application. Tried to add the datetimepicker in yet another place in it - not works, no matter how i jumped hoops.

Then i tried to write minimal example - first with project's copy of code, then with most fresh. No way either.

Here's the HTML file, loadable from deep subdirectory. All dependencies loaded from Google, ex for jQuery-Timepicker-Addon itself - git-clone into current directory. No errors in debug tool, just silent failure. Browsers are most modern (Ubuntu updater swears) Firefox and Chrome.

<html>
    <head>
        <link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/smoothness/jquery-ui.css" />
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.js"></script>
        <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.js"></script>

        <link rel="stylesheet" href="jQuery-Timepicker-Addon/dist/jquery-ui-timepicker-addon.css" />
        <script src="jQuery-Timepicker-Addon/dist/jquery-ui-timepicker-addon.js"></script>
        <script src="jQuery-Timepicker-Addon/dist/i18n/jquery-ui-timepicker-ru.js"></script>
        <script src="jQuery-Timepicker-Addon/dist/jquery-ui-sliderAccess.js"></script>
    </head>
    <body>
        <input type="text" name="dp_test" id="dp_test" class="hasDatepicker"/>
        <script type="text/javascript">
            var $dp = $('.hasDatepicker').datetimepicker();
            console.log($dp);
        </script>
    </body>
</html>

P.S. The old instance of datetimepicker in application does work, and i can't figure what's the difference. P.S.2 Providing non-minimal examples is unfriendly.