Skip to content

Commit 5431802

Browse files
committed
Slight corrections on DatePickerPlugin readme
1 parent 253540d commit 5431802

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

Android/DatePicker/README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
1. Copy the .js file to your 'www' folder
2-
2. Create a package com.phonegap.plugin
2+
2. Create a package com.phonegap.plugins
33
3. Copy the .java file into this package
44
4. Update your res/xml/plugins.xml file with the following line:
55

6-
`<plugin name="DatePickerPlugin" value="com.phonegap.plugin.DatePickerPlugin"/>`
6+
`<plugin name="DatePickerPlugin" value="com.phonegap.plugins.DatePickerPlugin"/>`
77

8-
5. Add a class="nativedatepicker" to your <input> element for which you want the native datepicker
9-
6. Add the following jQuery fragment to handle the click on these input elements:
8+
5. Add the JavaScript file to your HTML page where you want to use the DatePicker:
9+
10+
`<script type="text/javascript" charset="utf-8" src="datePickerPlugin.js"></script>`
11+
12+
6. Add a class="nativedatepicker" to your <input> element for which you want the native datepicker
13+
7. Add the following jQuery fragment to handle the click on these input elements:
1014

1115
```
1216
$('.nativedatepicker').focus(function(event) {
@@ -50,9 +54,9 @@
5054
});
5155
```
5256

53-
7. It is recommended to prefil these input fields and make these fields read only with a standard date format, preferably with three letter month so it can always be parsed.
57+
8. It is recommended to prefil these input fields and make these fields read only with a standard date format, preferably with three letter month so it can always be parsed.
5458

55-
8. You may need to convert the result of date.parse() back to an object to get the picker to work a second or third time around. If so, try inserting this code after the myNewDate declaration:
59+
9. You may need to convert the result of date.parse() back to an object to get the picker to work a second or third time around. If so, try inserting this code after the myNewDate declaration:
5660

5761
``` if(typeof myNewDate === "number"){
5862
myNewDate = new Date (myNewDate);

0 commit comments

Comments
 (0)