简体   繁体   中英

Cordova date-picker issue

picker plugin in cordova date-picker plugin link . It successfully configure into iOS and android project and its works only first time, after that date function not call again.

function dateAction(){
  alert("here");
  datePicker.show(options, function(date){
    alert("date result " + date);
  });
}

var options = {
  date: new Date(),
  mode: 'date'
};

Please figure out the problem. I will use same code which will be provide into that link.

Try declaring the options in the function

 function dateAction(){

    var options = {
      date: new Date(),
      mode: 'date'
      };
    alert("here");
    datePicker.show(options, function(date){
        alert("date result " + date);
    });
    }

This should work!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM