Skip to content

Commit

Permalink
Merge pull request #22 from pedromorgan/patch-1
Browse files Browse the repository at this point in the history
Note re js quirk of zero based month
  • Loading branch information
shiv19 authored May 1, 2018
2 parents 65dca7e + 31d290f commit a0b70ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ exports.selectDate = function() {
theme: "light",
maxDate: new Date()
}).then((result) => {
// Note the month is 1-12 (unlike js which is 0-11)
console.log("Date is: " + result.day + "-" + result.month + "-" + result.year);
var jsdate = new Date(result.year, result.month - 1, result.day);
}).catch((error) => {
console.log("Error: " + error);
});
Expand All @@ -82,7 +84,7 @@ exports.selectTime = function() {

`pickDate(options): Promise<{}>;`

Returns a promise that resolves to date object
Returns a promise that resolves to date object (Note: the month is 1-12, unlike js which is 0-11)
```js
date: {
day: number,
Expand Down

0 comments on commit a0b70ae

Please sign in to comment.