jQueryMobile - DateBox

Home

jQuery Mobile Framework :: DateBox

A Date and Time Picker plugin for jQueryMobile

Adding a Clear Button

If you restict manual editing of the date input, you may wish to provide a clear button. To do so, set 'useClearButton' to TRUE.

<label for="mydate">Some Date</label>

<input name="mydate" id="mydate" type="date" data-role="datebox"
   data-options='{"useClearButton": true, "mode":"calbox"}'>

Collapsing the Buttons

Alternativly, you may wish to display both the "Set" and "Clear" buttons on the same line. Set 'useClearButton' and 'useCollapsedBut' to TRUE.

<label for="mydate">Some Date</label>

<input name="mydate" id="mydate" type="date" data-role="datebox"
   data-options='{"useClearButton": true, "useCollapsedBut": true, "mode":"datebox"}'>