From 16dc72076f6f02e7cd6819e50da4c9fb396a65c9 Mon Sep 17 00:00:00 2001 From: Vitalii Blagodir Date: Fri, 26 Jun 2015 12:25:20 +0300 Subject: [PATCH] v0.8.2 add Android error callback --- README.md | 34 ++++++++++++++-------------------- package.json | 4 ++-- plugin.xml | 2 +- 3 files changed, 17 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 4b3aa4b..1f6b9b9 100644 --- a/README.md +++ b/README.md @@ -44,13 +44,19 @@ phonegap local plugin add cordova-plugin-datepicker ```js var options = { - date: new Date(), - mode: 'date' + date: new Date(), + mode: 'date' }; -datePicker.show(options, function(date){ - alert("date result " + date); -}); +function onSuccess(date) { + alert('Selected date: ' + date); +} + +function onError(error) { // Android only + alert('Error: ' + error); +} + +datePicker.show(options, onSuccess, onError); ``` ## Options @@ -192,18 +198,6 @@ Type: Integer Default: `1` ## Requirements -- PhoneGap 3.0 or newer / Cordova 3.0 or newer -- Android 2.3.1 or newer / iOS 5 or newer - -## Example - -```js -var options = { - date: new Date(), - mode: 'date' -}; - -datePicker.show(options, function(date){ - alert("date result " + date); -}); -``` \ No newline at end of file +- Cordova 3.0+ +- iOS 6.0+ +- Android 2.3+ \ No newline at end of file diff --git a/package.json b/package.json index c238b46..cedd3e9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-datepicker", - "version": "0.8.1", + "version": "0.8.2", "description": "Cordova DatePicker Plugin", "cordova": { "id": "cordova-plugin-datepicker", @@ -24,4 +24,4 @@ ], "author": "Vitalii Blagodir ", "license": "Apache 2.0" -} +} \ No newline at end of file diff --git a/plugin.xml b/plugin.xml index fc5d23f..862d475 100644 --- a/plugin.xml +++ b/plugin.xml @@ -3,7 +3,7 @@ + version="0.8.2"> DatePicker