jQueryMobile - DateBox

Home

jQuery Mobile Framework :: DateBox

A Date and Time Picker plugin for jQueryMobile

Different Display and Submit Formats

You can also link inputs easily. (Show with optional 'center popup' option)

HTML
<label for="split1">Date (D/M/Y)</label>
<input name="split1" type="text" data-role="datebox"
  data-options='{"mode": "datebox", "overrideDateFormat":"%d/%m/%Y"}' id="split1" />
<label for="split2">Second Format (Year-Month-Day)</label>
<input name="split2" id="split2" type="text" />
					
JQuery
$('#split1').live('datebox', function(e,p) {
  if ( p.method === 'set') {
    $('#split2').val(
      $('#split1').datebox('callFormat','%Y-%m-%d', p.date)
    );
  }  
});