public class DatePickerDialogModule extends ReactContextBaseJavaModule
NativeModule
that allows JS to show a native date picker dialog and get called back when
the user selects a date.NativeModule.NativeMethod
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FRAGMENT_TAG |
METHOD_TYPE_ASYNC, METHOD_TYPE_PROMISE, METHOD_TYPE_SYNC
Constructor and Description |
---|
DatePickerDialogModule(ReactApplicationContext reactContext) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName() |
void |
open(ReadableMap options,
Promise promise)
Show a date picker dialog.
|
getCurrentActivity, getReactApplicationContext
canOverrideExistingModule, getConstants, hasConstants, initialize, onCatalystInstanceDestroy
public static final java.lang.String FRAGMENT_TAG
public DatePickerDialogModule(ReactApplicationContext reactContext)
public java.lang.String getName()
require()
this module
from javascript.public void open(ReadableMap options, Promise promise)
options
- a map containing options. Available keys are:
date
(timestamp in milliseconds) the date to show by defaultminDate
(timestamp in milliseconds) the minimum date the user should be allowed
to select
maxDate
(timestamp in milliseconds) the maximum date the user should be allowed
to select
mode
To set the date picker mode to 'calendar/spinner/default'
promise
- This will be invoked with parameters action, year,
month (0-11), day, where action is dateSetAction
or
dismissedAction
, depending on what the user did. If the action is
dismiss, year, month and date are undefined.