Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port DatePicker to phonegap 2.0 #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions Android/DatePicker/datePickerPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
* Phonegap DatePicker Plugin Copyright (c) Greg Allen 2011 MIT Licensed
* Reused and ported to Android plugin by Daniel van 't Oever
*/
if (typeof cordova !== "undefined") {
cordova.define("cordova/plugin/datepicker", function(require, exports, module) {
var exec = require("cordova/exec");

/**
* Constructor
*/
function DatePicker() {
var DatePicker = function() {
this._callback;
}
};

/**
* show - true to show the ad, false to hide the ad
Expand Down Expand Up @@ -43,10 +45,6 @@ if (typeof cordova !== "undefined") {
console.log("datePickerPlugin.js failed: " + err);
}

cordova.addConstructor(function() {
if (!window.plugins) {
window.plugins = {};
}
window.plugins.datePicker = new DatePicker();
});
};
var datePicker = new DatePicker();
module.exports = datePicker;
});