Native DatePicker not showing up in emulator, only textfield


#1

I’m trying to get ngCordova datepicker working and I’m having difficulty getting it to display when I click the input field. The simulator just shows the keyboard for a text input.

Here is my View

    <label class="item item-input item-stacked-label">
      <span class="input-label">Start Time</span>
      <input type="text" ng-model="data.startDateTime" ng-click="datePicker()">
    </label>

Here is my controller

$scope.datePicker = function(){
  var options = {
    date: new Date(),
    mode: 'date', // or 'date'
    minDate: new Date(),
    allowOldDates: true,
    allowFutureDates: true,
    doneButtonLabel: 'DONE',
    doneButtonColor: '#F2F3F4',
    cancelButtonLabel: 'CANCEL',
    cancelButtonColor: '#000000'
  };

  document.addEventListener("deviceready", function () {
    $cordovaDatePicker.show(options).then(function(date){
      alert(date);
    });
  }, false);
}

I have added $cordovaDatePicker as a dependecy to my controller as well. There are no errors inside of js console web looking at in the browser. I am unable to see it in the emulator as well as in Ionic View


#2

UPDATE

I followed the common issues section of the ngCordova site. I am now able to see the date picker, but only after the textfield keyboard displays and then I dismiss it.

So, when I click on the field, I get the following…

Then after I hit “Go” I see the following…


#4

Have you found a solution for this?