Datapicker code not working

Permalink
Hi guys,

I am trying to added a Jquery datepicker code and it is not working.

here is the website URL
http://goo.gl/yJM553

here is the code
<link rel="stylesheet" type="text/css" href="<?=$this->getThemePath()?>/td/jquery.datetimepicker.css"/ >
<script src="<?=$this->getThemePath()?>/td/jquery.datetimepicker.js"></script>
    <script>
      $('#Dtime').datetimepicker();
   </script>

 
ronyDdeveloper replied on at Permalink Best Answer Reply
ronyDdeveloper
You have to add <script src="<?=$this->getThemePath()?>/td/jquery.datetimepicker.js"></script> after the jquery library load. You have added this before jquery.js loads. This is the reason its not working.

Tony
jay4eva replied on at Permalink Reply
Hi,

Where exactly do i have to add? I couldn't find jquery.js?
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
Basically its coming from core. You have added header_required in your template. Add your datepicker script after that.

Rony
jay4eva replied on at Permalink Reply
i did add after that. it doesn't work
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
Well try this
<script>
      jQuery('#Dtime').datetimepicker();
   </script>


Note: I replaced $ with jQuery.
jay4eva replied on at Permalink Reply
works. Thanks alot.
nebuleu replied on at Permalink Reply
nebuleu
You probably already know it, but just in case:
concrete5 have a very useful Form Helper with widgets that can make you save a lot of time.

In your case, have a look at the Date-Time Form Helper in the developer documentation:
http://www.concrete5.org/documentation/developers/forms/concrete5-w...