title: Can I trigger date(time) picker from a function?
body: <p>I have a select with 20 options and when user <strong>selects only one particular option "Select date time"</strong> the date(time) picker should appear and <strong>then populate the date time text in a input box</strong>.</p>
  
  <p>Is that possible? How can I do that?</p>
  
  <p>I have date(picker) working right now. It is triggered by button and linked to a input box. But I want to modify how it works currently to my specific needs.</p>
  
  <p><strong>Question1:</strong> I know how to fire a function onchange of select. Then I filter the options and if it is the one I will somehow start date picker. I do not know how to do this part.</p>
  
  <p><strong>Question2:</strong> I do not know how to tell date picker to add the date text into existing text box. Maybe I can link the date timer picker with the text box somehow.</p>
  
  <ul>
  <li>jquery-1.7.2.min.js</li>
  <li>jquery-ui-1.8.21.custom.min.js</li>
  <li>jquery-ui-timepicker-addon.js</li>
  </ul>
  
  <h1>Update</h1>
  
  <p>In the <a href="http://jsfiddle.net/radek/dPRjS/3/" rel="nofollow">jsfiddle sample</a> I have select and text box. The button is created by date/time picker. </p>
  
  <p>What I want is:</p>
  
  <ul>
  <li>when user selects/clicks the "select date and time" option the date/time picker will appear and the text will be in the text box</li>
  <li>I don't want the button to be visible on the page</li>
  <li>I use the text box for other purposes not only for the date/time so the date/time picker cannot appear by any user action related to this text box</li>
  </ul>
  
  <p>html code from the sample</p>
  
  <pre><code>&lt;input id="datetime" type="text" name="datetime" value="" &gt;
  &lt;select size=5&gt;
      &lt;option value="not"&gt;Not this one&lt;/option&gt;
      &lt;option value="not"&gt;Not this one&lt;/option&gt;
      &lt;option value="not"&gt;Not this one&lt;/option&gt;
      &lt;option value="datetimepicker"&gt;Select date and time&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>javascript code from the sample</p>
  
  <pre><code>$('#datetime').datetimepicker({
      showOn: "button"
  });​
  </code></pre>
  
  <p>​Note: final working version as described above: <a href="http://jsfiddle.net/radek/dPRjS/8/" rel="nofollow">http://jsfiddle.net/radek/dPRjS/8/</a></p>