File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed
Libraries/Components/DatePickerAndroid Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 10
10
11
11
'use strict' ;
12
12
13
- const DatePickerModule = require ( '../../BatchedBridge/NativeModules' )
14
- . DatePickerAndroid ;
15
13
import type { Options , DatePickerOpenAction } from './DatePickerAndroidTypes' ;
14
+ import NativeDatePickerAndroid from './NativeDatePickerAndroid' ;
16
15
17
16
/**
18
17
* Convert a Date to a timestamp.
@@ -74,7 +73,7 @@ class DatePickerAndroid {
74
73
_toMillis ( optionsMs , 'minDate' ) ;
75
74
_toMillis ( optionsMs , 'maxDate' ) ;
76
75
}
77
- return DatePickerModule . open ( options ) ;
76
+ return NativeDatePickerAndroid . open ( options ) ;
78
77
}
79
78
80
79
/**
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow
8
+ * @format
9
+ */
10
+
11
+ 'use strict' ;
12
+
13
+ import type { TurboModule } from 'RCTExport' ;
14
+ import * as TurboModuleRegistry from 'TurboModuleRegistry' ;
15
+
16
+ export interface Spec extends TurboModule {
17
+ + open : ( options : Object ) = > Promise < Object > ;
18
+ }
19
+
20
+ export default TurboModuleRegistry . getEnforcing < Spec > ( 'DatePickerAndroid' ) ;
You can’t perform that action at this time.
0 commit comments