|
|
1 rok pred | |
|---|---|---|
| .. | ||
| examples | 1 rok pred | |
| public | 1 rok pred | |
| README.md | 1 rok pred | |
| changelog.txt | 1 rok pred | |
| documentation.txt | 1 rok pred | |
| license.txt | 1 rok pred | |
| readme.txt | 1 rok pred | |
| zebra-datepicker.jquery.json | 1 rok pred | |
##Zebra_Datepicker
####A super-lightweight, highly configurable, cross-browser date picker jQuery plugin
Zebra_Datepicker is a small, compact and highly configurable datepicker jQuery plugin, meant to enrich forms by adding the datepicker functionality to them. This jQuery plugin will automatically add a calendar icon to the indicated input fields which, when clicked, will open the attached datepicker. Users can easily jump between months and years due to the datepicker’s intuitive interface. The selected date will be entered in the input field using the date format of choice, configurable in the datepicker’s options.
##Features
Zebra_Datepicker has no dependencies other than jQuery 1.5.2+ but requires that the page you are using the plugin on to have a strict doctype like:
<!doctype html>
First, load the latest version of jQuery from a CDN and provide a fallback to a local source, like:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="public/javascript/jquery-1.9.1.js"><\/script>')</script>
Load the Zebra_Datepicker jQuery plugin:
<script type="text/javascript" src="path/to/zebra_datepicker.js"></script>
Load the stylesheet:
<link rel="stylesheet" href="path/to/zebra_datepicker.css" type="text/css">
Now, within the DOM-ready event, attach the Zebra_Datepicker plugin to a <input type=”text”> control
$(document).ready(function() {
// assuming the controls you want to attach the plugin to
// have the "datepicker" class set
$('input.datepicker').Zebra_DatePicker();
});
This will attach a calendar icon to the specified element(s). Clicking the icon, will make the date picker visible.
To get a reference to the instance of Zebra_DatePicker attached to an element do:
var $zdp = $('#element').data('Zebra_DatePicker');
Configuration options and demos on the project's homepage