html - Can't get the Datepicker to show on form using javascript -
i'm trying add datepicker online form part of student assessment. i'm new , i'm having issues . i've downloaded , linked jquery ui , i've typed code per jquery ui website states calendar doesn't pop on form when click in date field suggests, i've taken examples site still can't work.
<head> <link href="javascript/jquery-ui-1.10.3.custom/css/south-street/jquery-ui-1.10.3.custom.css" rel="stylesheet"> <script src="javascript/jquery-ui-1.10.3.custom/js/jquery-1.9.1.js"></script> <script src="javascript/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.js"></script> <script> function validate(){ date = document.getelementbyid("datepicker").value; errors = ""; if (date == ""){ errors += "please supply valid dob \n"; } } </script> </head> <body> <form name= "myform" method="post" action="" class="booking"> <fieldset> <div> <label for="datepicker" class="fixedwidth">date</label> <input type="text" name="datepicker" id="datepicker"/> </div> </fieldset> </body>
you need call code in ready or load function , or insert function , call in main js file.
Comments
Post a Comment