Streaming live at 10am (PST)

Need help with adding jQuery datepicker to input form


#1

Hey

I am trying to add datepicker to input form but not succeeding. Can anyone tell me what am I doing wrong?
So far I have made unique ID for the input field 'datepick' and added this code to head section under custom code:

    <script type="text/javascript" src="//code.jquery.com/jquery-1.9.1.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<script>
  $(function() {
    $( "#page-nav-datepick" ).datepicker();
  });
</script>

#2
  1. This code has to be in the before </body> field.
  2. Remove jquery load from code - it is already included
  3. We need your troubleshooting link. You can find it in site settings.

#3

I did the first 2 points, but nothing changed. Not sure where to find the third one tho.
Can you please check it yourself if it's working for you? Quick screencast maybe?


#4

Hi, just a comment, you have some jQueryUI css getting loaded, but I see no load for jquery-ui.js

So probably you need to do as @bartekkustra suggested, and first remove the line that loads jQuery since that is loaded by webflow, and then add line for jquery-ui cdn in the before body section.

I am not sure though, does webflow load the jquery ui code? I was not aware that it did, so then you need to include jquery ui if you are using jquery ui widgets.

Also sharing your project link, as suggested, is the way for people on the forum to view your project... you can do so by enabling the External Public Link from the site settings page.

Cheers


#5