saroj
saroj

Reputation: 653

dynamic javascript date picker

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?

Upvotes: 0

Views: 708

Answers (1)

mpm
mpm

Reputation: 20155

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

Upvotes: 2

Related Questions