Skip to content

Commit 8b77bae

Browse files
authored
Combined date and time picker from react-native core (#2)
Combined date and time picker from react-native core
2 parents d1a7204 + 8fcce11 commit 8b77bae

File tree

101 files changed

+34425
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+34425
-1
lines changed

.circleci/config.yml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
version: 2.1
2+
3+
orbs:
4+
rn: react-native-community/react-native@dev:0.1.0-rc14
5+
6+
jobs:
7+
checkout_code:
8+
executor: rn/linux_js
9+
steps:
10+
- checkout
11+
- persist_to_workspace:
12+
root: .
13+
paths: .
14+
15+
install_example:
16+
executor: rn/linux_js
17+
steps:
18+
- attach_workspace:
19+
at: .
20+
- run:
21+
name: Install example
22+
command: npm run install:example
23+
- persist_to_workspace:
24+
root: .
25+
paths: .
26+
27+
analyse:
28+
executor: rn/linux_js
29+
steps:
30+
- attach_workspace:
31+
at: .
32+
- run:
33+
name: Install
34+
command: npm ci
35+
- run:
36+
name: Lint JS Code (ESLint)
37+
command: npm run lint
38+
- run:
39+
name: Flow
40+
command: npm run flow
41+
- run:
42+
name: Jest
43+
command: npm run test
44+
45+
workflows:
46+
test:
47+
jobs:
48+
- checkout_code
49+
- analyse:
50+
requires:
51+
- checkout_code
52+
- install_example:
53+
requires:
54+
- checkout_code
55+
- rn/android_build:
56+
project_path: "example/android"
57+
name: build_android_debug
58+
requires:
59+
- install_example
60+
61+
# Add Detox tests before running this expensive job.
62+
# - rn/ios_build_and_test:
63+
# project_path: "example/ios/example.xcodeproj"
64+
# device: "iPhone X"
65+
# build_configuration: "Debug"
66+
# scheme: "Example"
67+
# requires:
68+
# - analyse

.eslintrc.js

+279
Large diffs are not rendered by default.

.flowconfig

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
[ignore]
2+
; This flowconfig is forked by platform - the only difference between them is which suffix is ignored.
3+
.*/*[.]android.js
4+
5+
; Ignore templates for 'react-native init'
6+
.*/local-cli/templates/.*
7+
8+
; Ignore the Dangerfile
9+
node_modules/react-native/bots/dangerfile.js
10+
11+
; Ignore "BUCK" generated dirs
12+
node_modules/react-native/\.buckd/
13+
14+
; Ignore unexpected extra "@providesModule"
15+
.*/node_modules/.*/node_modules/fbjs/.*
16+
17+
; Ignore duplicate module providers
18+
; For RN Apps installed via npm, "Libraries" folder is inside
19+
; "node_modules/react-native" but in the source repo it is in the root
20+
.*/Libraries/react-native/React.js
21+
22+
; Ignore polyfills
23+
.*/Libraries/polyfills/.*
24+
25+
; These should not be required directly
26+
; require from fbjs/lib instead: require('fbjs/lib/invariant')
27+
.*/node_modules/warning/.*
28+
29+
; Flow doesn't support platforms
30+
.*/Libraries/Utilities/HMRLoadingView.js
31+
32+
[untyped]
33+
.*/node_modules/@react-native-community/cli/.*/.*
34+
35+
[include]
36+
37+
[libs]
38+
node_modules/react-native/Libraries/react-native/react-native-interface.js
39+
node_modules/react-native/flow/
40+
41+
[options]
42+
emoji=true
43+
44+
esproposal.optional_chaining=enable
45+
esproposal.nullish_coalescing=enable
46+
47+
module.file_ext=.ios.js
48+
module.file_ext=.js
49+
module.system=haste
50+
module.system.haste.use_name_reducers=true
51+
# keep the following in sync with server/haste/hasteImpl.js
52+
# get basename
53+
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
54+
# strip .js or .js.flow suffix
55+
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
56+
# strip platform suffix
57+
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
58+
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
59+
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
60+
module.system.haste.paths.blacklist=.*/__tests__/.*
61+
module.system.haste.paths.blacklist=.*/__mocks__/.*
62+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
63+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/RNTester/.*
64+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/IntegrationTests/.*
65+
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
66+
module.system.haste.paths.blacklist=<PROJECT_ROOT>/Libraries/react-native/react-native-implementation.js
67+
68+
munge_underscores=true
69+
70+
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
71+
72+
suppress_type=$FlowIssue
73+
suppress_type=$FlowFixMe
74+
suppress_type=$FlowFixMeProps
75+
suppress_type=$FlowFixMeState
76+
77+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*[react_native\\(_android\\)?_oss|react_native\\(_android\\)?_fb][a-z,_]*\\)?)\\)
78+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*[react_native\\(_android\\)?_oss|react_native\\(_android\\)?_fb][a-z,_]*\\)?)\\)?:? #[0-9]+
79+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
80+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
81+
82+
[lints]
83+
sketchy-null-number=warn
84+
sketchy-null-mixed=warn
85+
sketchy-number=warn
86+
untyped-type-import=warn
87+
nonstrict-import=warn
88+
deprecated-type=warn
89+
unsafe-getters-setters=warn
90+
inexact-spread=warn
91+
unnecessary-invariant=warn
92+
deprecated-call-syntax=warn
93+
signature-verification-failure=warn
94+
deprecated-utility=error
95+
96+
[strict]
97+
deprecated-type
98+
nonstrict-import
99+
sketchy-null
100+
unclear-type
101+
unsafe-getters-setters
102+
untyped-import
103+
untyped-type-import
104+
105+
[version]
106+
^0.95.0

.flowconfig.android

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
[ignore]
2+
; We fork some components by platform
3+
.*/*[.]ios.js
4+
5+
; Ignore templates for 'react-native init'
6+
.*/local-cli/templates/.*
7+
8+
; Ignore the Dangerfile
9+
node_modules/react-native/bots/dangerfile.js
10+
11+
; Ignore "BUCK" generated dirs
12+
node_modules/react-native/\.buckd/
13+
14+
; Ignore unexpected extra "@providesModule"
15+
.*/node_modules/.*/node_modules/fbjs/.*
16+
17+
; Ignore duplicate module providers
18+
; For RN Apps installed via npm, "Libraries" folder is inside
19+
; "node_modules/react-native" but in the source repo it is in the root
20+
.*/Libraries/react-native/React.js
21+
22+
; Ignore polyfills
23+
.*/Libraries/polyfills/.*
24+
25+
; These should not be required directly
26+
; require from fbjs/lib instead: require('fbjs/lib/warning')
27+
.*/node_modules/warning/.*
28+
29+
; Flow doesn't support platforms
30+
.*/Libraries/Utilities/HMRLoadingView.js
31+
32+
[untyped]
33+
.*/node_modules/@react-native-community/cli/.*/.*
34+
35+
[include]
36+
37+
[libs]
38+
node_modules/react-native/Libraries/react-native/react-native-interface.js
39+
node_modules/react-native/flow/
40+
41+
[options]
42+
emoji=true
43+
44+
esproposal.optional_chaining=enable
45+
esproposal.nullish_coalescing=enable
46+
47+
module.file_ext=.android.js
48+
module.file_ext=.js
49+
module.system=haste
50+
module.system.haste.use_name_reducers=true
51+
# keep the following in sync with server/haste/hasteImpl.js
52+
# get basename
53+
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
54+
# strip .js or .js.flow suffix
55+
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
56+
# strip .android suffix
57+
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
58+
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
59+
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
60+
module.system.haste.paths.blacklist=.*/__tests__/.*
61+
module.system.haste.paths.blacklist=.*/__mocks__/.*
62+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
63+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/RNTester/.*
64+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/IntegrationTests/.*
65+
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
66+
module.system.haste.paths.blacklist=<PROJECT_ROOT>/Libraries/react-native/react-native-implementation.js
67+
68+
munge_underscores=true
69+
70+
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
71+
72+
suppress_type=$FlowIssue
73+
suppress_type=$FlowFixMe
74+
suppress_type=$FlowFixMeProps
75+
suppress_type=$FlowFixMeState
76+
77+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_android\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
78+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_android\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
79+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
80+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
81+
82+
[lints]
83+
sketchy-null-number=warn
84+
sketchy-null-mixed=warn
85+
sketchy-number=warn
86+
untyped-type-import=warn
87+
nonstrict-import=warn
88+
deprecated-type=warn
89+
unsafe-getters-setters=warn
90+
inexact-spread=warn
91+
unnecessary-invariant=warn
92+
deprecated-call-syntax=warn
93+
signature-verification-failure=warn
94+
deprecated-utility=error
95+
96+
[strict]
97+
deprecated-type
98+
nonstrict-import
99+
sketchy-null
100+
unclear-type
101+
unsafe-getters-setters
102+
untyped-import
103+
untyped-type-import
104+
105+
[version]
106+
^0.95.0

.gitignore

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# node.js
6+
#
7+
node_modules/
8+
npm-debug.log
9+
yarn-error.log
10+
11+
12+
# Xcode
13+
#
14+
build/
15+
*.pbxuser
16+
!default.pbxuser
17+
*.mode1v3
18+
!default.mode1v3
19+
*.mode2v3
20+
!default.mode2v3
21+
*.perspectivev3
22+
!default.perspectivev3
23+
xcuserdata
24+
*.xccheckout
25+
*.moved-aside
26+
DerivedData
27+
*.hmap
28+
*.ipa
29+
*.xcuserstate
30+
project.xcworkspace
31+
32+
33+
# Android/IntelliJ
34+
#
35+
build/
36+
.idea
37+
.gradle
38+
local.properties
39+
*.iml
40+
41+
# BUCK
42+
buck-out/
43+
\.buckd/
44+
*.keystore
45+
46+
# Editor config
47+
.vscode
48+

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 React Native Community
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
# react-native-datepicker
1+
# React Native DateTimePicker
2+
3+
[![CircleCI](https://circleci.com/gh/react-native-community/react-native-datetimepicker.svg?style=svg)](https://circleci.com/gh/react-native-community/react-native-datetimepicker)

RNDateTimePicker.podspec

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
require 'json'
2+
3+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4+
5+
Pod::Spec.new do |s|
6+
s.name = "RNDateTimePicker"
7+
s.version = package['version']
8+
s.summary = package['description']
9+
s.description = package['description']
10+
s.license = package['license']
11+
s.author = package['author']
12+
s.homepage = package['homepage']
13+
s.platform = :ios, "10.0"
14+
s.source = { :git => "https://github.com/react-native-community/react-native-datetimepicker", :tag => "master" }
15+
s.source_files = "ios/*.{h,m}"
16+
s.requires_arc = true
17+
18+
s.dependency "React"
19+
end

0 commit comments

Comments
 (0)