title: How to implement the DATE PICKER in PhoneGap/Android?
body: <p>I have tried to implement the date picker in android. I want it to get the data and show it in the text format</p>
  
  <pre><code>  &lt;html&gt;
    &lt;head&gt;
      &lt;script type="text/javascript" charset="utf-8" src="cordova-2.5.0.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" charset="utf-8" src="datePickerPlugin.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" charset="utf-8"&gt;
  
    function dateTest() {
        var myNewDate = new Date();
  
        window.plugins.datePicker.show({
            date : myNewDate,
            mode : 'date', // date or time or blank for both
            allowOldDates : true
        }, function(returnDate) {
          var newDate = new Date(returnDate);
              currentField.val(newDate.toString("dd/MMM/yyyy"));
  
              // This fixes the problem you mention at the bottom of this script with it not working a second/third time around, because it is in focus.
              currentField.blur();
        });
    }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body bgcolor="#ffffff"&gt;
  &lt;hr&gt;DatePicker Test&lt;hr&gt;&lt;br&gt;
       &lt;input type="button" onClick ="dateTest()" value ="Today's Date!!" /&gt;
       &lt;div id="view"&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I am getting it as an alert...but unable to store it as a string on the same page</p>