Skip to content

Commit

Permalink
v0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
VitaliiBlagodir committed Jun 17, 2015
1 parent 54d637c commit a8021db
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 4 deletions.
56 changes: 53 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,33 @@ This is a combined version of DatePicker iOS and Android and Windows plugin for

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

New in 0.8.0 (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


## Installation

1) Make sure that you have [Node](http://nodejs.org/) and [Cordova CLI](https://github.com/apache/cordova-cli) or [PhoneGap's CLI](https://github.com/mwbrooks/phonegap-cli) installed on your machine.

2) Add a plugin to your project using Cordova CLI:

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

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

## Usage
Expand Down Expand Up @@ -60,14 +74,50 @@ 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
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-datepicker"
version="0.7.1">
version="0.8.0">

<name>DatePicker</name>

Expand Down

0 comments on commit a8021db

Please sign in to comment.