-
Notifications
You must be signed in to change notification settings - Fork 457
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,8 @@ function datepicker(locals) { | |
} | ||
|
||
// Setup the picker mode | ||
var datePickerMode = "date"; | ||
if (locals.mode === "date" || locals.mode === "time") { | ||
var datePickerMode = 'date'; | ||
if (locals.mode === 'date' || locals.mode === 'time') { | ||
This comment has been minimized.
Sorry, something went wrong. |
||
datePickerMode = locals.mode; | ||
} | ||
|
||
|
@@ -29,13 +29,13 @@ function datepicker(locals) { | |
* ``locals.config.format``: Date format function | ||
*/ | ||
var formattedValue = String(locals.value); | ||
var background = TouchableNativeFeedback.SelectableBackground() | ||
var background = TouchableNativeFeedback.SelectableBackground(); // eslint-disable-line new-cap | ||
if (locals.config) { | ||
if (locals.config.format) { | ||
formattedValue = locals.config.format(locals.value); | ||
} | ||
if (locals.config.background) { | ||
background = locals.config.background | ||
background = locals.config.background; | ||
This comment has been minimized.
Sorry, something went wrong.
alvaromb
Collaborator
|
||
} | ||
} | ||
|
||
|
@@ -50,7 +50,7 @@ function datepicker(locals) { | |
ref="input" | ||
background={background} | ||
onPress={function () { | ||
if (datePickerMode === "time") { | ||
if (datePickerMode === 'time') { | ||
TimePickerAndroid.open({is24Hour: true}) | ||
.then(function (time) { | ||
if (time.action !== TimePickerAndroid.dismissedAction) { | ||
|
@@ -59,7 +59,7 @@ function datepicker(locals) { | |
newTime.setMinutes(time.minute); | ||
locals.onChange(newTime); | ||
} | ||
}) | ||
}); | ||
} else { | ||
DatePickerAndroid.open({date: new Date()}) | ||
.then(function (date) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry for the double quotes, I thought you were using it instead of single quotes 😄