values = new ArrayList<>();
19 | Calendar cal = Calendar.getInstance();
20 |
21 | cal.set(Calendar.MONTH, 0);
22 | for (int i = 0; i <= 11; ++i) {
23 | values.add(getLocaleString(cal));
24 | cal.add(Calendar.MONTH, 1);
25 | }
26 | return values;
27 | }
28 |
29 | @Override
30 | public boolean visible() {
31 | return state.getMode() == Mode.date;
32 | }
33 |
34 | @Override
35 | public boolean wrapSelectorWheel() {
36 | return true;
37 | }
38 |
39 | @Override
40 | public String getFormatPattern() {
41 | return "LLLL";
42 | }
43 |
44 | @Override
45 | public Paint.Align getTextAlign() {
46 | return Paint.Align.LEFT;
47 | }
48 |
49 | }
--------------------------------------------------------------------------------
/android/src/main/res/drawable/number_picker_divider_material.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/android/src/main/res/drawable/overlay.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
11 |
--------------------------------------------------------------------------------
/android/src/main/res/layout/number_picker_material.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
--------------------------------------------------------------------------------
/android/src/main/res/values-fi/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Päivämääränvalitsin
4 | Valitse Vuosi
5 | Valitse Kuukausi
6 | Valitse Päivämäärä
7 | Valitse Päivä
8 | Valitse Tunti
9 | Valitse Minuutit
10 | Valitse am/pm
11 | Kello on
12 | Tunti:
13 | Minuutit
14 |
15 |
--------------------------------------------------------------------------------
/android/src/main/res/values-fr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Date Picker Overlay
4 | Sélectionnez l\'année
5 | Sélectionnez le mois
6 | Sélectionnez la date
7 | Sélectionnez le jour
8 | Sélectionnez l\'heure
9 | Sélectionnez les minutes
10 | Sélectionnez AM/PM
11 | Le temps est
12 | Heure :
13 | Minutes
14 |
--------------------------------------------------------------------------------
/android/src/main/res/values-he/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | בוחר תאריכים צף
3 | בחירת שנה
4 | בחירת חודש
5 | בחירת תאריך
6 | בחירת יום
7 | בחירת שעה
8 | בחירת דקות
9 | בחירה ב־AM/PM
10 | השעה היא
11 | שעה :
12 | דקות
13 |
14 |
--------------------------------------------------------------------------------
/android/src/main/res/values-nb/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Datovelger
4 | Velg år
5 | Velg måned
6 | Velg dato
7 | Velg dag
8 | Velg time
9 | Velg minutter
10 | Velg am/pm
11 | Tiden er
12 | Time
13 | Minutter
14 |
15 |
--------------------------------------------------------------------------------
/android/src/main/res/values-nl/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Date Picker Overlay
4 | Selecteer jaar
5 | Selecteer maand
6 | Selecteer datum
7 | Selecteer dag
8 | Selecteer uur
9 | Selecteer minuten
10 | Selecteer AM/PM
11 | Tijd is
12 | Uur :
13 | Minuten
14 |
--------------------------------------------------------------------------------
/android/src/main/res/values-nn/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Datoveljar
4 | Vel år
5 | Vel månad
6 | Vel dato
7 | Vel dag
8 | Vel time
9 | Vel minutt
10 | Vel am/pm
11 | Tida er
12 | Time
13 | Minutt
14 |
15 |
--------------------------------------------------------------------------------
/android/src/main/res/values-no/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Datovelger
4 | Velg år
5 | Velg måned
6 | Velg dato
7 | Velg dag
8 | Velg time
9 | Velg minutter
10 | Velg am/pm
11 | Tiden er
12 | Time
13 | Minutter
14 |
15 |
--------------------------------------------------------------------------------
/android/src/main/res/values-sv/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Datumväljare på
4 | Välj ett år
5 | Välj en månad
6 | Välj ett datum
7 | Välj en dag
8 | Välj en timme
9 | Välj minuter
10 | Välj am/pm
11 | Tiden är
12 | Timme:
13 | Minuter
14 |
15 |
--------------------------------------------------------------------------------
/android/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Date Picker Overlay
3 | Select Year
4 | Select Month
5 | Select Date
6 | Select Day
7 | Select Hour
8 | Select Minutes
9 | Select AM/PM
10 | Time is
11 | Hour :
12 | Minutes
13 |
14 |
--------------------------------------------------------------------------------
/android/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
9 |
17 |
20 |
--------------------------------------------------------------------------------
/android/src/newarch/java/com/henninghall/date_picker/DatePickerModule.java:
--------------------------------------------------------------------------------
1 | package com.henninghall.date_picker;
2 |
3 | import androidx.annotation.NonNull;
4 |
5 | import com.facebook.react.bridge.ReactApplicationContext;
6 | import com.facebook.react.bridge.ReadableMap;
7 |
8 | import net.time4j.android.ApplicationStarter;
9 |
10 | public class DatePickerModule extends NativeRNDatePickerSpec {
11 |
12 | private final DatePickerModuleImpl module;
13 |
14 | DatePickerModule(ReactApplicationContext context) {
15 | super(context);
16 | ApplicationStarter.initialize(context, false); // false = no need to prefetch on time data background tread
17 | module = new DatePickerModuleImpl(context);
18 | }
19 |
20 | @Override
21 | public void addListener(String eventName) {
22 | // Keep: Required for RN built in Event Emitter Calls.
23 | }
24 |
25 | @Override
26 | public void removeListeners(double type) {
27 | // Keep: Required for RN built in Event Emitter Calls.
28 | }
29 |
30 | @Override
31 | public void openPicker(ReadableMap props){
32 | module.openPicker(props);
33 | }
34 |
35 | @Override
36 | public void closePicker(){
37 | module.closePicker();
38 | }
39 |
40 | @Override
41 | @NonNull
42 | public String getName() {
43 | return DatePickerModuleImpl.NAME;
44 | }
45 | }
--------------------------------------------------------------------------------
/android/src/oldarch/java/com/henninghall/date_picker/DatePickerModule.java:
--------------------------------------------------------------------------------
1 | package com.henninghall.date_picker;
2 |
3 |
4 | import com.facebook.react.bridge.ReactApplicationContext;
5 | import com.facebook.react.bridge.ReactContextBaseJavaModule;
6 | import com.facebook.react.bridge.ReactMethod;
7 | import com.facebook.react.bridge.ReadableMap;
8 |
9 | public class DatePickerModule extends ReactContextBaseJavaModule {
10 |
11 | private final DatePickerModuleImpl module;
12 |
13 | DatePickerModule(ReactApplicationContext context) {
14 | super(context);
15 | module = new DatePickerModuleImpl(context);
16 | }
17 |
18 | @ReactMethod
19 | public void addListener(String eventName) {
20 | // Keep: Required for RN built in Event Emitter Calls.
21 | }
22 |
23 | @ReactMethod
24 | public void removeListeners(Integer count) {
25 | // Keep: Required for RN built in Event Emitter Calls.
26 | }
27 |
28 | @ReactMethod
29 | public void openPicker(ReadableMap props) {
30 | module.openPicker(props);
31 | }
32 |
33 | @ReactMethod
34 | public void closePicker(){
35 | module.closePicker();
36 | }
37 |
38 | @Override
39 | public String getName() {
40 | return DatePickerModuleImpl.NAME;
41 | }
42 | }
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:@react-native/babel-preset'],
3 | }
4 |
--------------------------------------------------------------------------------
/docs/button-colors.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/docs/button-colors.png
--------------------------------------------------------------------------------
/docs/colors-android.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/docs/colors-android.png
--------------------------------------------------------------------------------
/docs/colors-ios.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/docs/colors-ios.png
--------------------------------------------------------------------------------
/docs/date-mode-android.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/docs/date-mode-android.png
--------------------------------------------------------------------------------
/docs/date-mode-ios.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/docs/date-mode-ios.png
--------------------------------------------------------------------------------
/docs/datetime-mode-android.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/docs/datetime-mode-android.png
--------------------------------------------------------------------------------
/docs/datetime-mode-ios.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/docs/datetime-mode-ios.png
--------------------------------------------------------------------------------
/docs/divider-color.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/docs/divider-color.png
--------------------------------------------------------------------------------
/docs/locale-android.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/docs/locale-android.png
--------------------------------------------------------------------------------
/docs/locale-ios.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/docs/locale-ios.png
--------------------------------------------------------------------------------
/docs/minute-interval-android.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/docs/minute-interval-android.png
--------------------------------------------------------------------------------
/docs/minute-interval-ios.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/docs/minute-interval-ios.png
--------------------------------------------------------------------------------
/docs/react-native-date-picker-android-native.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/docs/react-native-date-picker-android-native.gif
--------------------------------------------------------------------------------
/docs/react-native-date-picker-android.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/docs/react-native-date-picker-android.gif
--------------------------------------------------------------------------------
/docs/react-native-date-picker-android.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/docs/react-native-date-picker-android.png
--------------------------------------------------------------------------------
/docs/react-native-date-picker.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/docs/react-native-date-picker.gif
--------------------------------------------------------------------------------
/docs/react-native-date-time-picker-android-inline.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/docs/react-native-date-time-picker-android-inline.gif
--------------------------------------------------------------------------------
/docs/react-native-date-time-picker-ios-inline.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/docs/react-native-date-time-picker-ios-inline.gif
--------------------------------------------------------------------------------
/docs/react-native-datetime-picker-modal-android.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/docs/react-native-datetime-picker-modal-android.gif
--------------------------------------------------------------------------------
/docs/react-native-datetime-picker-modal-ios.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/docs/react-native-datetime-picker-modal-ios.gif
--------------------------------------------------------------------------------
/docs/time-mode-android.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/docs/time-mode-android.png
--------------------------------------------------------------------------------
/docs/time-mode-ios.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/docs/time-mode-ios.png
--------------------------------------------------------------------------------
/examples/Rn069/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/examples/Rn069/.bundle/config:
--------------------------------------------------------------------------------
1 | BUNDLE_PATH: "vendor/bundle"
2 | BUNDLE_FORCE_RUBY_PLATFORM: 1
3 |
--------------------------------------------------------------------------------
/examples/Rn069/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: '@react-native-community',
4 | plugins: [],
5 | overrides: [
6 | {
7 | files: ['**/*.spec.js', '**/*.spec.jsx', '*.js'],
8 | env: {
9 | jest: true,
10 | 'jest/globals': true,
11 | },
12 | },
13 | ],
14 | };
15 |
--------------------------------------------------------------------------------
/examples/Rn069/.gitignore:
--------------------------------------------------------------------------------
1 | artifacts
2 |
3 | # OSX
4 | #
5 | .DS_Store
6 |
7 | # Xcode
8 | #
9 | build/
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata
19 | *.xccheckout
20 | *.moved-aside
21 | DerivedData
22 | *.hmap
23 | *.ipa
24 | *.xcuserstate
25 | ios/.xcode.env.local
26 |
27 | # Android/IntelliJ
28 | #
29 | build/
30 | .idea
31 | .gradle
32 | local.properties
33 | *.iml
34 | *.hprof
35 |
36 | # node.js
37 | #
38 | node_modules/
39 | npm-debug.log
40 | yarn-error.log
41 |
42 | # BUCK
43 | buck-out/
44 | \.buckd/
45 | *.keystore
46 | !debug.keystore
47 |
48 | # fastlane
49 | #
50 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
51 | # screenshots whenever they are needed.
52 | # For more information about the recommended setup visit:
53 | # https://docs.fastlane.tools/best-practices/source-control/
54 |
55 | **/fastlane/report.xml
56 | **/fastlane/Preview.html
57 | **/fastlane/screenshots
58 | **/fastlane/test_output
59 |
60 | # Bundle artifact
61 | *.jsbundle
62 |
63 | # Ruby / CocoaPods
64 | /ios/Pods/
65 | /vendor/bundle/
66 |
--------------------------------------------------------------------------------
/examples/Rn069/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | arrowParens: 'avoid',
3 | bracketSameLine: true,
4 | bracketSpacing: false,
5 | singleQuote: true,
6 | trailingComma: 'all',
7 | };
8 |
--------------------------------------------------------------------------------
/examples/Rn069/.ruby-version:
--------------------------------------------------------------------------------
1 | 2.7.5
2 |
--------------------------------------------------------------------------------
/examples/Rn069/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/examples/Rn069/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4 | ruby '2.7.5'
5 |
6 | gem 'cocoapods', '~> 1.11', '>= 1.11.2'
7 |
--------------------------------------------------------------------------------
/examples/Rn069/android/app/_BUCK:
--------------------------------------------------------------------------------
1 | # To learn about Buck see [Docs](https://buckbuild.com/).
2 | # To run your application with Buck:
3 | # - install Buck
4 | # - `npm start` - to start the packager
5 | # - `cd android`
6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8 | # - `buck install -r android/app` - compile, install and run application
9 | #
10 |
11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12 |
13 | lib_deps = []
14 |
15 | create_aar_targets(glob(["libs/*.aar"]))
16 |
17 | create_jar_targets(glob(["libs/*.jar"]))
18 |
19 | android_library(
20 | name = "all-libs",
21 | exported_deps = lib_deps,
22 | )
23 |
24 | android_library(
25 | name = "app-code",
26 | srcs = glob([
27 | "src/main/java/**/*.java",
28 | ]),
29 | deps = [
30 | ":all-libs",
31 | ":build_config",
32 | ":res",
33 | ],
34 | )
35 |
36 | android_build_config(
37 | name = "build_config",
38 | package = "com.rn069",
39 | )
40 |
41 | android_resource(
42 | name = "res",
43 | package = "com.rn069",
44 | res = "src/main/res",
45 | )
46 |
47 | android_binary(
48 | name = "app",
49 | keystore = "//android/keystores:debug",
50 | manifest = "src/main/AndroidManifest.xml",
51 | package_type = "debug",
52 | deps = [
53 | ":app-code",
54 | ],
55 | )
56 |
--------------------------------------------------------------------------------
/examples/Rn069/android/app/build_defs.bzl:
--------------------------------------------------------------------------------
1 | """Helper definitions to glob .aar and .jar targets"""
2 |
3 | def create_aar_targets(aarfiles):
4 | for aarfile in aarfiles:
5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6 | lib_deps.append(":" + name)
7 | android_prebuilt_aar(
8 | name = name,
9 | aar = aarfile,
10 | )
11 |
12 | def create_jar_targets(jarfiles):
13 | for jarfile in jarfiles:
14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15 | lib_deps.append(":" + name)
16 | prebuilt_jar(
17 | name = name,
18 | binary_jar = jarfile,
19 | )
20 |
--------------------------------------------------------------------------------
/examples/Rn069/android/app/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/examples/Rn069/android/app/debug.keystore
--------------------------------------------------------------------------------
/examples/Rn069/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
14 | >
15 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/main/java/com/rn069/newarchitecture/components/MainComponentsRegistry.java:
--------------------------------------------------------------------------------
1 | package com.rn069.newarchitecture.components;
2 |
3 | import com.facebook.jni.HybridData;
4 | import com.facebook.proguard.annotations.DoNotStrip;
5 | import com.facebook.react.fabric.ComponentFactory;
6 | import com.facebook.soloader.SoLoader;
7 |
8 | /**
9 | * Class responsible to load the custom Fabric Components. This class has native methods and needs a
10 | * corresponding C++ implementation/header file to work correctly (already placed inside the jni/
11 | * folder for you).
12 | *
13 | * Please note that this class is used ONLY if you opt-in for the New Architecture (see the
14 | * `newArchEnabled` property). Is ignored otherwise.
15 | */
16 | @DoNotStrip
17 | public class MainComponentsRegistry {
18 | static {
19 | SoLoader.loadLibrary("fabricjni");
20 | }
21 |
22 | @DoNotStrip private final HybridData mHybridData;
23 |
24 | @DoNotStrip
25 | private native HybridData initHybrid(ComponentFactory componentFactory);
26 |
27 | @DoNotStrip
28 | private MainComponentsRegistry(ComponentFactory componentFactory) {
29 | mHybridData = initHybrid(componentFactory);
30 | }
31 |
32 | @DoNotStrip
33 | public static MainComponentsRegistry register(ComponentFactory componentFactory) {
34 | return new MainComponentsRegistry(componentFactory);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/main/jni/Android.mk:
--------------------------------------------------------------------------------
1 | THIS_DIR := $(call my-dir)
2 |
3 | include $(REACT_ANDROID_DIR)/Android-prebuilt.mk
4 |
5 | # If you wish to add a custom TurboModule or Fabric component in your app you
6 | # will have to include the following autogenerated makefile.
7 | # include $(GENERATED_SRC_DIR)/codegen/jni/Android.mk
8 | include $(CLEAR_VARS)
9 |
10 | LOCAL_PATH := $(THIS_DIR)
11 |
12 | # You can customize the name of your application .so file here.
13 | LOCAL_MODULE := rn069_appmodules
14 |
15 | LOCAL_C_INCLUDES := $(LOCAL_PATH)
16 | LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
17 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
18 |
19 | # If you wish to add a custom TurboModule or Fabric component in your app you
20 | # will have to uncomment those lines to include the generated source
21 | # files from the codegen (placed in $(GENERATED_SRC_DIR)/codegen/jni)
22 | #
23 | # LOCAL_C_INCLUDES += $(GENERATED_SRC_DIR)/codegen/jni
24 | # LOCAL_SRC_FILES += $(wildcard $(GENERATED_SRC_DIR)/codegen/jni/*.cpp)
25 | # LOCAL_EXPORT_C_INCLUDES += $(GENERATED_SRC_DIR)/codegen/jni
26 |
27 | # Here you should add any native library you wish to depend on.
28 | LOCAL_SHARED_LIBRARIES := \
29 | libfabricjni \
30 | libfbjni \
31 | libfolly_runtime \
32 | libglog \
33 | libjsi \
34 | libreact_codegen_rncore \
35 | libreact_debug \
36 | libreact_nativemodule_core \
37 | libreact_render_componentregistry \
38 | libreact_render_core \
39 | libreact_render_debug \
40 | libreact_render_graphics \
41 | librrc_view \
42 | libruntimeexecutor \
43 | libturbomodulejsijni \
44 | libyoga
45 |
46 | LOCAL_CFLAGS := -DLOG_TAG=\"ReactNative\" -fexceptions -frtti -std=c++17 -Wall
47 |
48 | include $(BUILD_SHARED_LIBRARY)
49 |
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/main/jni/MainApplicationModuleProvider.cpp:
--------------------------------------------------------------------------------
1 | #include "MainApplicationModuleProvider.h"
2 |
3 | #include
4 |
5 | namespace facebook {
6 | namespace react {
7 |
8 | std::shared_ptr MainApplicationModuleProvider(
9 | const std::string moduleName,
10 | const JavaTurboModule::InitParams ¶ms) {
11 | // Here you can provide your own module provider for TurboModules coming from
12 | // either your application or from external libraries. The approach to follow
13 | // is similar to the following (for a library called `samplelibrary`:
14 | //
15 | // auto module = samplelibrary_ModuleProvider(moduleName, params);
16 | // if (module != nullptr) {
17 | // return module;
18 | // }
19 | // return rncore_ModuleProvider(moduleName, params);
20 | return rncore_ModuleProvider(moduleName, params);
21 | }
22 |
23 | } // namespace react
24 | } // namespace facebook
25 |
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/main/jni/MainApplicationModuleProvider.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 |
6 | #include
7 |
8 | namespace facebook {
9 | namespace react {
10 |
11 | std::shared_ptr MainApplicationModuleProvider(
12 | const std::string moduleName,
13 | const JavaTurboModule::InitParams ¶ms);
14 |
15 | } // namespace react
16 | } // namespace facebook
17 |
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp:
--------------------------------------------------------------------------------
1 | #include "MainApplicationTurboModuleManagerDelegate.h"
2 | #include "MainApplicationModuleProvider.h"
3 |
4 | namespace facebook {
5 | namespace react {
6 |
7 | jni::local_ref
8 | MainApplicationTurboModuleManagerDelegate::initHybrid(
9 | jni::alias_ref) {
10 | return makeCxxInstance();
11 | }
12 |
13 | void MainApplicationTurboModuleManagerDelegate::registerNatives() {
14 | registerHybrid({
15 | makeNativeMethod(
16 | "initHybrid", MainApplicationTurboModuleManagerDelegate::initHybrid),
17 | makeNativeMethod(
18 | "canCreateTurboModule",
19 | MainApplicationTurboModuleManagerDelegate::canCreateTurboModule),
20 | });
21 | }
22 |
23 | std::shared_ptr
24 | MainApplicationTurboModuleManagerDelegate::getTurboModule(
25 | const std::string name,
26 | const std::shared_ptr jsInvoker) {
27 | // Not implemented yet: provide pure-C++ NativeModules here.
28 | return nullptr;
29 | }
30 |
31 | std::shared_ptr
32 | MainApplicationTurboModuleManagerDelegate::getTurboModule(
33 | const std::string name,
34 | const JavaTurboModule::InitParams ¶ms) {
35 | return MainApplicationModuleProvider(name, params);
36 | }
37 |
38 | bool MainApplicationTurboModuleManagerDelegate::canCreateTurboModule(
39 | std::string name) {
40 | return getTurboModule(name, nullptr) != nullptr ||
41 | getTurboModule(name, {.moduleName = name}) != nullptr;
42 | }
43 |
44 | } // namespace react
45 | } // namespace facebook
46 |
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | #include
5 | #include
6 |
7 | namespace facebook {
8 | namespace react {
9 |
10 | class MainApplicationTurboModuleManagerDelegate
11 | : public jni::HybridClass<
12 | MainApplicationTurboModuleManagerDelegate,
13 | TurboModuleManagerDelegate> {
14 | public:
15 | // Adapt it to the package you used for your Java class.
16 | static constexpr auto kJavaDescriptor =
17 | "Lcom/Rn069/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate;";
18 |
19 | static jni::local_ref initHybrid(jni::alias_ref);
20 |
21 | static void registerNatives();
22 |
23 | std::shared_ptr getTurboModule(
24 | const std::string name,
25 | const std::shared_ptr jsInvoker) override;
26 | std::shared_ptr getTurboModule(
27 | const std::string name,
28 | const JavaTurboModule::InitParams ¶ms) override;
29 |
30 | /**
31 | * Test-only method. Allows user to verify whether a TurboModule can be
32 | * created by instances of this class.
33 | */
34 | bool canCreateTurboModule(std::string name);
35 | };
36 |
37 | } // namespace react
38 | } // namespace facebook
39 |
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/main/jni/MainComponentsRegistry.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | namespace facebook {
9 | namespace react {
10 |
11 | class MainComponentsRegistry
12 | : public facebook::jni::HybridClass {
13 | public:
14 | // Adapt it to the package you used for your Java class.
15 | constexpr static auto kJavaDescriptor =
16 | "Lcom/Rn069/newarchitecture/components/MainComponentsRegistry;";
17 |
18 | static void registerNatives();
19 |
20 | MainComponentsRegistry(ComponentFactory *delegate);
21 |
22 | private:
23 | static std::shared_ptr
24 | sharedProviderRegistry();
25 |
26 | static jni::local_ref initHybrid(
27 | jni::alias_ref,
28 | ComponentFactory *delegate);
29 | };
30 |
31 | } // namespace react
32 | } // namespace facebook
33 |
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/main/jni/OnLoad.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include "MainApplicationTurboModuleManagerDelegate.h"
3 | #include "MainComponentsRegistry.h"
4 |
5 | JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) {
6 | return facebook::jni::initialize(vm, [] {
7 | facebook::react::MainApplicationTurboModuleManagerDelegate::
8 | registerNatives();
9 | facebook::react::MainComponentsRegistry::registerNatives();
10 | });
11 | }
12 |
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/examples/Rn069/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/examples/Rn069/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/examples/Rn069/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/examples/Rn069/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/examples/Rn069/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/examples/Rn069/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/examples/Rn069/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/examples/Rn069/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/examples/Rn069/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/examples/Rn069/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Rn069
3 |
4 |
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/examples/Rn069/android/app/src/main/res/xml/network_security_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 10.0.2.2
5 | localhost
6 |
7 |
8 |
--------------------------------------------------------------------------------
/examples/Rn069/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/henninghall/react-native-date-picker/1dcf1c147c14a7e7ab00995646b830ec6b91e9ce/examples/Rn069/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/examples/Rn069/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/examples/Rn069/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'Rn069'
2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3 | include ':app'
4 | includeBuild('../node_modules/react-native-gradle-plugin')
5 |
6 | if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
7 | include(":ReactAndroid")
8 | project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid')
9 | include(":ReactAndroid:hermes-engine")
10 | project(":ReactAndroid:hermes-engine").projectDir = file('../node_modules/react-native/ReactAndroid/hermes-engine')
11 | }
--------------------------------------------------------------------------------
/examples/Rn069/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Rn069",
3 | "displayName": "Rn069"
4 | }
5 |
--------------------------------------------------------------------------------
/examples/Rn069/babel.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const pak = require('../../package.json');
3 |
4 | module.exports = {
5 | presets: [
6 | ['module:metro-react-native-babel-preset'],
7 | ['@babel/preset-typescript', {allowDeclareFields: true}], // to allow use of declare context
8 | ],
9 | plugins: [
10 | [
11 | 'module-resolver',
12 | {
13 | extensions: ['.tsx', '.ts', '.js', '.json'],
14 | alias: {
15 | [pak.name]: path.join(__dirname, '../..', pak.source),
16 | },
17 | },
18 | ],
19 | ],
20 | };
21 |
--------------------------------------------------------------------------------
/examples/Rn069/config.ini:
--------------------------------------------------------------------------------
1 | hw.lcd.width=1080
2 |
--------------------------------------------------------------------------------
/examples/Rn069/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import {AppRegistry} from 'react-native';
6 | import App from './src/App';
7 | import {name as appName} from './app.json';
8 |
9 | AppRegistry.registerComponent(appName, () => App);
10 |
--------------------------------------------------------------------------------
/examples/Rn069/ios/.xcode.env:
--------------------------------------------------------------------------------
1 | # This `.xcode.env` file is versioned and is used to source the environment
2 | # used when running script phases inside Xcode.
3 | # To customize your local environment, you can create an `.xcode.env.local`
4 | # file that is not versioned.
5 |
6 | # NODE_BINARY variable contains the PATH to the node executable.
7 | #
8 | # Customize the NODE_BINARY variable here.
9 | # For example, to use nvm with brew, add the following line
10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use
11 | export NODE_BINARY=$(command -v node)
12 |
--------------------------------------------------------------------------------
/examples/Rn069/ios/Podfile:
--------------------------------------------------------------------------------
1 | require_relative '../node_modules/react-native/scripts/react_native_pods'
2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3 |
4 | platform :ios, '12.4'
5 | install! 'cocoapods', :deterministic_uuids => false
6 |
7 | target 'Rn069' do
8 | config = use_native_modules!
9 |
10 | # Flags change depending on the env values.
11 | flags = get_default_flags()
12 |
13 | use_react_native!(
14 | :path => config[:reactNativePath],
15 | # to enable hermes on iOS, change `false` to `true` and then install pods
16 | :hermes_enabled => flags[:hermes_enabled],
17 | :fabric_enabled => flags[:fabric_enabled],
18 | # An absolute path to your application root.
19 | :app_path => "#{Pod::Config.instance.installation_root}/.."
20 | )
21 |
22 | rn_date_picker_path = '../../..'
23 | pod 'react-native-date-picker', :path => rn_date_picker_path
24 |
25 | target 'Rn069Tests' do
26 | inherit! :complete
27 | # Pods for testing
28 | end
29 |
30 | # Enables Flipper.
31 | #
32 | # Note that if you have use_frameworks! enabled, Flipper will not work and
33 | # you should disable the next line.
34 | use_flipper!()
35 |
36 | post_install do |installer|
37 | react_native_post_install(installer)
38 | __apply_Xcode_12_5_M1_post_install_workaround(installer)
39 | end
40 | end
41 |
--------------------------------------------------------------------------------
/examples/Rn069/ios/Rn069.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/Rn069/ios/Rn069.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/Rn069/ios/Rn069/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : UIResponder
5 |
6 | @property (nonatomic, strong) UIWindow *window;
7 |
8 | @end
9 |
--------------------------------------------------------------------------------
/examples/Rn069/ios/Rn069/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "2x",
6 | "size" : "20x20"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "3x",
11 | "size" : "20x20"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "2x",
16 | "size" : "29x29"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "3x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "2x",
26 | "size" : "40x40"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "scale" : "2x",
36 | "size" : "60x60"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "scale" : "3x",
41 | "size" : "60x60"
42 | },
43 | {
44 | "idiom" : "ios-marketing",
45 | "scale" : "1x",
46 | "size" : "1024x1024"
47 | }
48 | ],
49 | "info" : {
50 | "author" : "xcode",
51 | "version" : 1
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/examples/Rn069/ios/Rn069/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/examples/Rn069/ios/Rn069/main.m:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char *argv[])
6 | {
7 | @autoreleasepool {
8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/examples/Rn069/ios/Rn069Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/Rn069/manual-tests/daylight-saving.md:
--------------------------------------------------------------------------------
1 | # Daylight saving testing
2 |
3 | I haven't found an automatic way to change the time on the emulator to be able to run these tests automatically.
4 |
5 | ## Test: AM/PM wheel should have proper values
6 |
7 | 1. Set the timezone to GMT-07:00 Pacific Standard Time.
8 | 1. Set the time to 2020-11-01
9 | 1. Set 24h setting to false. (AM/PM=true)
10 | 1. Go to time or datetime picker
11 | 1. Expect: Both AM and PM being in visible in AM/PM wheel.
12 |
13 | ## Test: Hour wheel should have proper values
14 |
15 | 1. Set the timezone to GMT-07:00 Pacific Standard Time.
16 | 1. Set the time to 2020-10-31 8:00 PM
17 | 1. Set 24h setting to false. (AM/PM=true)
18 | 1. Go to time or datetime picker.
19 | 1. Expect: All hours to exist on hour wheel and no hour missing.
20 |
--------------------------------------------------------------------------------
/examples/Rn069/metro.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const escape = require('escape-string-regexp');
3 | const exclusionList = require('metro-config/src/defaults/exclusionList');
4 | const pak = require('../../package.json');
5 |
6 | const root = path.resolve(__dirname, '../..');
7 |
8 | const modules = Object.keys({
9 | ...pak.peerDependencies,
10 | });
11 |
12 | module.exports = {
13 | projectRoot: __dirname,
14 | watchFolders: [root],
15 |
16 | // We need to make sure that only one version is loaded for peerDependencies
17 | // So we block them at the root, and alias them to the versions in example's node_modules
18 | resolver: {
19 | blacklistRE: exclusionList(
20 | modules.map(
21 | m => new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`),
22 | ),
23 | ),
24 |
25 | extraNodeModules: modules.reduce((acc, name) => {
26 | acc[name] = path.join(__dirname, 'node_modules', name);
27 | return acc;
28 | }, {}),
29 | },
30 |
31 | transformer: {
32 | getTransformOptions: async () => ({
33 | transform: {
34 | experimentalImportSupport: false,
35 | inlineRequires: true,
36 | },
37 | }),
38 | },
39 | };
40 |
--------------------------------------------------------------------------------
/examples/Rn069/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Rn069",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "android": "react-native run-android",
7 | "ios": "react-native run-ios",
8 | "pods": "(cd ios && bundle exec pod install)",
9 | "start": "react-native start",
10 | "test": "jest",
11 | "lint": "eslint .",
12 | "set-time-format": "adb shell settings put system time_12_24",
13 | "test:android": "yarn test:android-12h-mode && yarn test:android-24h-mode",
14 | "test:android:ci": "yarn test:android-12h-mode:ci && yarn test:android-24h-mode:ci",
15 | "emulator": "scripts/start-android-emulator.sh"
16 | },
17 | "dependencies": {
18 | "react": "18.0.0",
19 | "react-native": "0.69.0"
20 | },
21 | "devDependencies": {
22 | "@babel/core": "^7.12.9",
23 | "@babel/preset-typescript": "^7.18.6",
24 | "@babel/runtime": "^7.21.0",
25 | "@react-native-community/eslint-config": "^2.0.0",
26 | "babel-jest": "^28.1.2",
27 | "babel-plugin-module-resolver": "^4.1.0",
28 | "eslint": "^7.32.0",
29 | "jest": "^28.1.2",
30 | "metro-react-native-babel-preset": "^0.70.3",
31 | "react-test-renderer": "18.0.0"
32 | },
33 | "jest": {
34 | "preset": "react-native"
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/examples/Rn069/react-native.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 |
3 | module.exports = {
4 | dependencies: {
5 | 'react-native-date-picker': {
6 | root: path.join(__dirname, '../..'),
7 | },
8 | },
9 | };
10 |
--------------------------------------------------------------------------------
/examples/Rn069/src/PropButton.js:
--------------------------------------------------------------------------------
1 | import React, {Component} from 'react';
2 | import {Button} from 'react-native';
3 |
4 | export const PropButton = ({title, value, onChange}) => (
5 |