Skip to content

Commit

Permalink
README and plugin.xml changed to pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
andrelsmoraes committed Jun 16, 2015
1 parent ad596d4 commit f589221
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 65 deletions.
70 changes: 9 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
# DatePicker Plugin for Cordova/PhoneGap 4.0 (iOS and Android and Windows), Ionic 1.3 (tested on Android and iOS)
# DatePicker Plugin for Cordova/PhoneGap 4.0 (iOS and Android and Windows)

Original version https://github.com/VitaliiBlagodir/cordova-plugin-datepicker
This is a combined version of DatePicker iOS and Android and Windows plugin for Cordova/Phonegap 4.0.
- Original iOS version: https://github.com/sectore/phonegap3-ios-datepicker-plugin

New in this fork (Android Only):

- Android code refactored

- Option datetime added (default if mode is unknown), opening a new time dialog after setting the date

- Options okText and cancelText to define the labels for POSITIVE and NEGATIVE buttons

- Option todayText to set the label of a button that selects current date (date and datetime)

- Option nowText to set the label of a button that selects current time (time and datetime)

- Option is24Hour added
- Original Android version: https://github.com/bikasv/cordova-android-plugins/tree/master/datepicker

## Installation

Expand All @@ -23,17 +12,12 @@ New in this fork (Android Only):
2) Add a plugin to your project using Cordova CLI:

```bash
cordova plugin add https://github.com/andrelsmoraes/cordova-plugin-datepicker.git
cordova plugin add https://github.com/VitaliiBlagodir/cordova-plugin-datepicker
```
Or using PhoneGap CLI:

```bash
phonegap local plugin add https://github.com/andrelsmoraes/cordova-plugin-datepicker.git
```
Or using Ionic CLI:

```bash
ionic plugin add https://github.com/andrelsmoraes/cordova-plugin-datepicker.git
phonegap local plugin add https://github.com/VitaliiBlagodir/cordova-plugin-datepicker
```

## Usage
Expand All @@ -56,7 +40,7 @@ The mode of the date picker.

Type: String

Values: `date` | `time` | `datetime`
Values: `date` | `time` | `datetime` (iOS, Windows only)

Default: `date`

Expand All @@ -76,50 +60,14 @@ Default: `(empty String)`

minDate is a Date object for iOS and an integer for Android, so you need to account for that when using the plugin.


### maxDate - iOS, Android, Windows
Maximum date.

Type: Date | empty String

Default: `(empty String)`

### okText - Android
Label of BUTTON_POSITIVE (done button). If empty, uses android.R.string.ok.

Type: String | empty String

Default: `(empty String)`

### cancelText - Android
Label of BUTTON_NEGATIVE (cancel button). If empty, uses android.R.string.cancel.

Type: String | empty String

Default: `(empty String)`

### todayText - Android
Label of today button. If empty, doesn't show the option to select current date.

Type: String | empty String

Default: `(empty String)`

### nowText - Android
Label of now button. If empty, doesn't show the option to select current time.

Type: String | empty String

Default: `(empty String)`

### is24Hour - Android
Shows time dialog in 24 hours format.

Type: Boolean

Values: `true` | `false`

Default: `false`

### allowOldDates - iOS
Shows or hide dates earlier then selected date.

Expand Down Expand Up @@ -202,4 +150,4 @@ var options = {
datePicker.show(options, function(date){
alert("date result " + date);
});
```
```
8 changes: 4 additions & 4 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="com.plugin.datepicker"
version="0.8.0">
id="cordova-plugin-datepicker"
version="0.7.1">

<name>DatePicker</name>

Expand All @@ -13,7 +13,7 @@

<keywords>cordova,phonegap,datepicker,android,ios,ios7,ios8,wp</keywords>

<repo>https://github.com/andrelsmoraes/cordova-plugin-datepicker.git</repo>
<repo>https://github.com/VitaliiBlagodir/cordova-plugin-datepicker.git</repo>

<!-- android -->
<platform name="android">
Expand Down Expand Up @@ -57,4 +57,4 @@
</js-module>
</platform>

</plugin>
</plugin>

0 comments on commit f589221

Please sign in to comment.