Mobi Pick - Basic demo

Basic Datepicker



Load styles and scripts
				<link rel="stylesheet" type="text/css" href="css/mobipick.css" />
				<script type="text/javascript" src="external/xdate.js"></script>
				<script type="text/javascript" src="external/xdate.i18n.js"></script>
				<script type="text/javascript" src="js/mobipick.js"></script>
Create an input within your jQuery Mobile page. Input type is "text" in order to suppress native datepicker.
<input type="text" />
Apply Mobi Pick after jQuery Mobile page is created (basic configuration).
				$( document ).on( "pagecreate", pageselector, function() {
					var picker = $( "input[type='text']", this );
					picker.mobipick();
				});
Optionally handle date changes (works with native and mobipick datepicker)
				picker.on( "change", function() {
					// formatted date, like yyyy-mm-dd				
					var date = $( this ).val();

					// JavaScript Date object
					var dateObject = $( this ).mobipick( "option", "date" );
				});
Created by Christoph Baudson. Feel free to check out my blog.