0

I have a script for dynamic javascript date picker, taken from here. Please scroll down to Toggle by Element which i want to implement but it is not working

<html>
 <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
     <SCRIPT type="text/javascript" src="js/jquery.min.js"></SCRIPT>

edit: i added the following mootools script

<script src='http://cdnjs.cloudflare.com/ajax/libs/mootools/1.3.2/mootools-yui-
compressed.js'
type='text/javascript'></script>


      <SCRIPT type="text/javascript" src="datepicker.js"></SCRIPT>
      <SCRIPT type="text/css" src="datepicker.css"></SCRIPT>
      <SCRIPT type="text/css" src="datepicker_vista.css"></SCRIPT>
</head>
 <body>    
 <script language="JavaScript">
   window.addEvent('load', function() {
    new DatePicker('.demo_allow_empty', {
    pickerClass: 'datepicker_dashboard',
    allowEmpty: true
 });
  });
 </script>
<label>Datepicker starting at and allowing no value:</label>
<input name='date_allow_empty' type='text' value='' class='date demo_allow_empty' />
</body>
</html>

what i am missing?

2
  • it requires mootools , where is your mootools script tag ? Commented Apr 9, 2012 at 12:28
  • mootools script tag? i could not get you, i have not added any js or css files except above 4 files, do i need to add something more? Commented Apr 9, 2012 at 12:31

1 Answer 1

2

It seems it require mootools, i cant see any mootools script tag in your source. it has nothing to do with jQuery.

edit : here is an exemple :

<script src='http://cdnjs.cloudflare.com/ajax/libs/mootools/1.3.2/mootools-yui-compressed.js'
type='text/javascript'></script>

put it before the date picker script

Sign up to request clarification or add additional context in comments.

4 Comments

can you please tell me little bit more how to get this mootools script tag?
i added but same problem is occuring, when i am clicking on that image nothing happens
it is coming but haphazardly, perhaps i am missing some css files
it is working in fiddle but not working in my terminal, let me check properly perhaps i am doing wrong somewhere

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.