Search code examples
jquerydatetimepicker

i cant get the jquery-ui-timepicker-addon to work


since joomla doesnt have a datetime field type in trying to use the jquery-ui-timepicker-addon.js i followed the installation steps but nothing happend i have this in the

  <script src="/joomla/administrator/components/com_xxx/js/jquery_2.0.3/jquery.min.js" type="text/javascript"></script>

  <script src="/joomla/administrator/components/com_xxx/js/jquery_ui_1.11.4/jquery-ui.min.js" type="text/javascript"></script>

  <script src="/joomla/administrator/components/com_xxx/js/jquery-ui-timepicker-addon.js" type="text/javascript"></script>

and this is the HTML

    <div id="tp-examples" aria-labelledby="ui-id-5" class="ui-tabs-panel ui-widget-content ui-corner-bottom" role="tabpanel" aria-hidden="false" style="display: block;">
    <input type="text" id="jform_date_arrivee" name="jform[date_arrivee]" value="" class="hasDatepicker" aria-invalid="false">
        </div>
     <script type="text/javascript">  
    $("#jform_date_arrivee").timepicker() 
    </script>

am i missing somthing ? i dont know if this matter but im also using jquery chosen plugin


Solution

  • I tested it here http://jsbin.com/xudabelago/1/ and it worked when I removed the class from the input element.

    <input type="text" id="jform_date_arrivee" name="jform[date_arrivee]" value="" >
    

    Also don't forget to include the css file, http://trentrichardson.com/examples/timepicker/jquery-ui-timepicker-addon.css .