Download
Demo
- Overview
- Documents
User Rating: 0/5 ( 0 votes)
Your Rating:
This plugin provides a navigation between date range, either by a defined range (week, month and year). Ideal for querying information accurately by AJAX calls.
1. INCLUDE STYLESHEET AND JAVASCRIPT
<link rel="stylesheet" href="css/jquery-mobile/jquery.mobile-1.2.0.min.css"/> <link rel="stylesheet" href="css/jquery-mobile/jquery-mobile-fluid960.min.css"/> <script src="js/jquery-1.8.2.min.js"></script> <script src="js/jquery.mobile-1.2.0.min.js"></script> <script src="js/jquery.date.core.js"></script> <script src="js/jquery.mobile.date.navigation.js"></script>
2. HTML
<div id="dateNavigation" data-date="2013-02-14" data-range="month"></div>
3. JAVASCRIPT
$(function(){ $("#dateNavigation").dateNavigation(); });
4. OPTIONS
$(function(){ $("#dateNavigation").dateNavigation({ options: { date: "2013-02-14", //Date initial. Default => "2010-01-01" range: "year", //Range selected initial. Default => "week" rangeLabels: { week: "Semana", //Label for combo selector in option week. Default => "Week" month: "Mes", //Label for combo selector in option month. Default => "Month" year: "Año" //Label for combo selector in option year. Default => "Year" } }, events: { //This event fires when press the button "Previous" onPreviousClick: function(){ //Your custom code here }, //This event fires when press the button "Next" onNextClick: function(){ //Your custom code here }, //This event fires when change the option in "Range" onRangeChange: function(event){ //Your custom code here //event.oldRange => Old range selected //event.newRange => New range selected }, //This event fires when date range changes onNavigate: function(event){ //Your custom code here //event.rangeSelected => Current range selected //event.range.ini => Current date initial of range //event.date => Current initialized date //event.range.end => Current date end of range } } }); });