Mootools 1.2 Datepicker: Intro

This is a simple datepicker based on this datepicker for mootools 1.11

I updated and refactored the code and added a fade effect (Except for IE, IE does not wanted to fade :S)

Demo

Usage

  1. Include the mootools 1.2 and Datepicker.js script
    <script type="text/javascript" src="mootools-1.2.1-core.js"></script>
    <script type="text/javascript" src="datepicker.js"></script>
    <link href="datepicker.css" type="text/css" rel="stylesheet" />	
  2. Add the following code to your head section
    <script type="text/javascript">
    	window.addEvent('domready',function(){
    		$$('input.DatePicker').DatePicker();
    	});
    </script>
  3. The first parameter of Element.Datepicker is an options object
    See here for some docs.

    Example:
    <script type="text/javascript">
    	window.addEvent('domready',function(){
    		$$('input.DatePicker').DatePicker({
    			format: 'yyyy/mm/dd',
    			dayChars: '3'
    		});
    	});
    </script>

Download

If you want the images like here, you can download these images and that css file. And replace this datepicker.css file. It should be a drop-in replacement, since I did not change much in the css file

Aryweb Webdevelopment