Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>if the dojox.mobile picker is what your looking for, you need to attach it to an overlay. There is no direct attachment. like the dijit/datetextbox. If the mobile picker is what you want below is an example.</p> <p>When using the opener, inside the show() is where you tell it what to attach to. </p> <pre><code>&lt;div id="customPicker" data-dojo-type="dojox/mobile/Opener" data-dojo-props="onHide:setDeliveryDate"&gt; &lt;h1 data-dojo-type="dojox/mobile/Heading" label="Custom Picker"&gt; &lt;div data-dojo-type="dojox/mobile/ToolBarButton" label="Done" class="mblColorBlue" style="width:45px;float:right;" onClick="dijit.registry.byId('customPicker').hide()"&gt;&lt;/div&gt; &lt;/h1&gt; &lt;div id="dateSpinner" data-dojo-type="dojox/mobile/DatePicker" data-dojo-props="monthPattern:'MM', dayPattern:'dd'"&gt;&lt;/div&gt; &lt;/div&gt; &lt;input id="dateField" onclick="dijit.registry.byId('customPicker').show(this)"&gt;&lt;/input&gt; </code></pre> <p>and the Script::</p> <pre><code>require(["dojo","dojox/mobile/Opener","dojox/mobile/Heading", "dojox/mobile/ToolBarButton","dojox/mobile/DatePicker", "dijit/registry"]) function setDeliveryDate(){ var spin =dijit.registry.byId("dateSpinner"); dojo.byId("dateField").value = spin.slots[1].value + "/" + spin.slots[2].value + "/" + spin.slots[0].value; } </code></pre> <p>Fiddle:<a href="http://jsfiddle.net/PrJzp/" rel="nofollow">http://jsfiddle.net/PrJzp/</a></p> <p>EDIT::</p> <p>To have a calendar in a span use the dijit/Calendar component.</p> <pre><code>require([ "dijit/Calendar", "dojo/date", "dojo/domReady!" ], function(Calendar, date){ new Calendar({ value: new Date(), }, "SpanWhereCalendarIS"); }); </code></pre> <p><a href="https://dojotoolkit.org/reference-guide/1.9/dijit/Calendar.html" rel="nofollow">https://dojotoolkit.org/reference-guide/1.9/dijit/Calendar.html</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload