Browse Source

Custom width and height + Layout improvements (#82)

* Custom height and width. Layout fixes. Organising example projects

* After merge fixes

* cleanup

* cleanup example

* cleanup
master
Henning Hall 6 years ago
committed by GitHub
parent
commit
e215538424
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
608 changed files with 9178 additions and 6810 deletions
  1. +1
    -0
      .npmignore
  2. +1
    -1
      android/build.gradle
  3. +0
    -4
      android/src/main/java/com/henninghall/date_picker/DatePickerManager.java
  4. +56
    -0
      android/src/main/java/com/henninghall/date_picker/EmptyWheelUpdater.java
  5. +1542
    -0
      android/src/main/java/com/henninghall/date_picker/NumberPickerView.java
  6. +27
    -9
      android/src/main/java/com/henninghall/date_picker/PickerView.java
  7. +1
    -7
      android/src/main/java/com/henninghall/date_picker/Style.java
  8. +10
    -13
      android/src/main/java/com/henninghall/date_picker/Utils.java
  9. +14
    -41
      android/src/main/java/com/henninghall/date_picker/WheelOrderUpdater.java
  10. +5
    -0
      android/src/main/java/com/henninghall/date_picker/WheelPosition.java
  11. +9
    -2
      android/src/main/java/com/henninghall/date_picker/wheels/AmPmWheel.java
  12. +7
    -0
      android/src/main/java/com/henninghall/date_picker/wheels/DateWheel.java
  13. +13
    -4
      android/src/main/java/com/henninghall/date_picker/wheels/DayWheel.java
  14. +7
    -5
      android/src/main/java/com/henninghall/date_picker/wheels/HourWheel.java
  15. +9
    -4
      android/src/main/java/com/henninghall/date_picker/wheels/MinutesWheel.java
  16. +7
    -0
      android/src/main/java/com/henninghall/date_picker/wheels/MonthWheel.java
  17. +5
    -3
      android/src/main/java/com/henninghall/date_picker/wheels/Wheel.java
  18. +8
    -0
      android/src/main/java/com/henninghall/date_picker/wheels/YearWheel.java
  19. +84
    -15
      android/src/main/res/layout/datepicker_view.xml
  20. +0
    -9
      example-react-native-v0.59.9/index.js
  21. +0
    -3
      example/.babelrc
  22. +0
    -358
      example/android/.gitignore
  23. +0
    -3
      example/android/app/src/main/res/values/strings.xml
  24. BIN
      example/android/gradle/wrapper/gradle-wrapper.jar
  25. +0
    -7
      example/android/settings.gradle
  26. +0
    -4
      example/app.json
  27. +0
    -129
      example/ios/DatePickerExample.xcodeproj/xcshareddata/xcschemes/DatePickerExample-tvOS.xcscheme
  28. +0
    -131
      example/ios/DatePickerExample.xcodeproj/xcshareddata/xcschemes/DatePickerExample.xcscheme
  29. +0
    -24
      example/ios/DatePickerExampleTests/Info.plist
  30. +0
    -25
      example/package.json
  31. +0
    -5529
      example/yarn.lock
  32. +0
    -0
      examples/advanced/.buckconfig
  33. +0
    -0
      examples/advanced/.flowconfig
  34. +0
    -0
      examples/advanced/.gitattributes
  35. +0
    -0
      examples/advanced/.gitignore
  36. +0
    -0
      examples/advanced/.watchmanconfig
  37. +0
    -0
      examples/advanced/__tests__/App-test.js
  38. +0
    -0
      examples/advanced/android/app/BUCK
  39. +0
    -0
      examples/advanced/android/app/build.gradle
  40. +0
    -0
      examples/advanced/android/app/build_defs.bzl
  41. +0
    -0
      examples/advanced/android/app/proguard-rules.pro
  42. +0
    -0
      examples/advanced/android/app/src/debug/AndroidManifest.xml
  43. +0
    -0
      examples/advanced/android/app/src/main/AndroidManifest.xml
  44. +0
    -0
      examples/advanced/android/app/src/main/java/com/rn599/MainActivity.java
  45. +0
    -0
      examples/advanced/android/app/src/main/java/com/rn599/MainApplication.java
  46. +0
    -0
      examples/advanced/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  47. +0
    -0
      examples/advanced/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
  48. +0
    -0
      examples/advanced/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  49. +0
    -0
      examples/advanced/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
  50. +0
    -0
      examples/advanced/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  51. +0
    -0
      examples/advanced/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  52. +0
    -0
      examples/advanced/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  53. +0
    -0
      examples/advanced/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  54. +0
    -0
      examples/advanced/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  55. +0
    -0
      examples/advanced/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  56. +0
    -0
      examples/advanced/android/app/src/main/res/values/strings.xml
  57. +0
    -0
      examples/advanced/android/app/src/main/res/values/styles.xml
  58. +0
    -0
      examples/advanced/android/build.gradle
  59. +0
    -0
      examples/advanced/android/gradle.properties
  60. +0
    -0
      examples/advanced/android/gradle/wrapper/gradle-wrapper.jar
  61. +0
    -0
      examples/advanced/android/gradle/wrapper/gradle-wrapper.properties
  62. +0
    -0
      examples/advanced/android/gradlew
  63. +0
    -0
      examples/advanced/android/gradlew.bat
  64. +0
    -0
      examples/advanced/android/keystores/BUCK
  65. +0
    -0
      examples/advanced/android/keystores/debug.keystore.properties
  66. +0
    -0
      examples/advanced/android/settings.gradle
  67. +0
    -0
      examples/advanced/app.json
  68. +0
    -0
      examples/advanced/babel.config.js
  69. +1
    -1
      examples/advanced/index.js
  70. +0
    -0
      examples/advanced/ios/rn599-tvOS/Info.plist
  71. +0
    -0
      examples/advanced/ios/rn599-tvOSTests/Info.plist
  72. +148
    -103
      examples/advanced/ios/rn599.xcodeproj/project.pbxproj
  73. +0
    -0
      examples/advanced/ios/rn599.xcodeproj/xcshareddata/xcschemes/rn599-tvOS.xcscheme
  74. +0
    -0
      examples/advanced/ios/rn599.xcodeproj/xcshareddata/xcschemes/rn599.xcscheme
  75. +0
    -0
      examples/advanced/ios/rn599/AppDelegate.h
  76. +0
    -0
      examples/advanced/ios/rn599/AppDelegate.m
  77. +0
    -0
      examples/advanced/ios/rn599/Base.lproj/LaunchScreen.xib
  78. +0
    -0
      examples/advanced/ios/rn599/Images.xcassets/AppIcon.appiconset/Contents.json
  79. +0
    -0
      examples/advanced/ios/rn599/Images.xcassets/Contents.json
  80. +0
    -0
      examples/advanced/ios/rn599/Info.plist
  81. +0
    -0
      examples/advanced/ios/rn599/main.m
  82. +0
    -0
      examples/advanced/ios/rn599Tests/Info.plist
  83. +0
    -0
      examples/advanced/ios/rn599Tests/rn599Tests.m
  84. +0
    -0
      examples/advanced/metro.config.js
  85. +1
    -1
      examples/advanced/package.json
  86. +1
    -1
      examples/advanced/src/App.js
  87. +0
    -0
      examples/advanced/src/PropButton.js
  88. +0
    -0
      examples/advanced/src/PropSlider.js
  89. +0
    -0
      examples/advanced/src/exampleKeys.js
  90. +0
    -0
      examples/advanced/src/examples.js
  91. +1
    -2
      examples/advanced/src/examples/Advanced.js
  92. +0
    -0
      examples/advanced/src/examples/DateMode.js
  93. +0
    -0
      examples/advanced/src/examples/Minimal.js
  94. +0
    -0
      examples/advanced/src/examples/TimeMode.js
  95. +0
    -0
      examples/advanced/src/locales.js
  96. +0
    -0
      examples/advanced/src/propPickers/DateChange.js
  97. +0
    -0
      examples/advanced/src/propPickers/FadeToColor.js
  98. +0
    -0
      examples/advanced/src/propPickers/LocalePicker.js
  99. +0
    -0
      examples/advanced/src/propPickers/MinMaxDateChange.js
  100. +0
    -0
      examples/advanced/src/propPickers/MinuteInterval.js

+ 1
- 0
.npmignore View File

@ -2,5 +2,6 @@ demo
docs
example
example-cocoapods
examples
githubREADME.md
.gitignore

+ 1
- 1
android/build.gradle View File

@ -28,7 +28,7 @@ android {
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.facebook.react:react-native:+'
compile 'com.henninghall.android:NumberPickerView:1.0.1'
compile 'com.henninghall.android:NumberPickerView:1.1.0'
compile 'org.apache.commons:commons-lang3:3.6'
compile group: 'net.time4j', name: 'time4j-android', version: '4.2-2018i'

+ 0
- 4
android/src/main/java/com/henninghall/date_picker/DatePickerManager.java View File

@ -91,10 +91,6 @@ public class DatePickerManager extends SimpleViewManager {
@ReactPropGroup(names = {"height", "width"}, customType = "Style")
public void setStyle(PickerView view, int index, Integer style) {
if(index == 0) view.style.setHeight(style);
if(index == 1) {
int width = (int) Utils.dpToPixels(style, DatePickerManager.context);
view.style.setWidth(width);
}
}
@Override

+ 56
- 0
android/src/main/java/com/henninghall/date_picker/EmptyWheelUpdater.java View File

@ -0,0 +1,56 @@
package com.henninghall.date_picker;
import java.util.HashMap;
import cn.carbswang.android.numberpickerview.library.NumberPickerView;
public class EmptyWheelUpdater {
private final PickerView pickerView;
private final HashMap<Integer, NumberPickerView> views;
private int[] ids = {
R.id.empty1,
R.id.empty2,
R.id.empty3
};
EmptyWheelUpdater(PickerView pickerView) {
this.pickerView = pickerView;
this.views = getViews();
}
private HashMap<Integer, NumberPickerView> getViews() {
HashMap<Integer, NumberPickerView> views = new HashMap<>();
for (int id: ids) {
NumberPickerView view = (NumberPickerView) pickerView.findViewById(id);
views.put(id, view);
}
return views;
}
void update(Mode mode) {
hideAll();
int numberOfVisibleWheels = pickerView.getVisibleWheels().size();
int emptyViewsToAdd = numberOfVisibleWheels - 1;
int numberOfPickerWheelsBeforeMode = getNumberOfPickerWheelsBeforeMode(mode);
for (int i = 0; i < emptyViewsToAdd; i++) {
int index = numberOfPickerWheelsBeforeMode + 1 + i * 2;
pickerView.wheelsWrapper.addView(views.get(ids[i]), index);
}
}
private int getNumberOfPickerWheelsBeforeMode(Mode mode) {
if(mode == Mode.date) return 1;
if(mode == Mode.datetime) return 4;
if(mode == Mode.time) return 5;
return 0;
}
private void hideAll() {
for (NumberPickerView view: views.values()) {
pickerView.wheelsWrapper.removeView(view);
}
}
}

+ 1542
- 0
android/src/main/java/com/henninghall/date_picker/NumberPickerView.java
File diff suppressed because it is too large
View File


+ 27
- 9
android/src/main/java/com/henninghall/date_picker/PickerView.java View File

@ -1,16 +1,10 @@
package com.henninghall.date_picker;
import android.os.Build;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.uimanager.events.RCTEventEmitter;
import com.henninghall.date_picker.wheelFunctions.AnimateToDate;
import com.henninghall.date_picker.wheelFunctions.Refresh;
import com.henninghall.date_picker.wheelFunctions.SetDate;
import com.henninghall.date_picker.wheelFunctions.UpdateVisibility;
@ -24,13 +18,11 @@ import com.henninghall.date_picker.wheels.MonthWheel;
import com.henninghall.date_picker.wheels.Wheel;
import com.henninghall.date_picker.wheels.YearWheel;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.TimeZone;
@ -40,6 +32,7 @@ import cn.carbswang.android.numberpickerview.library.NumberPickerView;
public class PickerView extends RelativeLayout {
public LinearLayout wheelsWrapper;
public SimpleDateFormat dateFormat;
private HourWheel hourWheel;
private DayWheel dayWheel;
@ -53,6 +46,7 @@ public class PickerView extends RelativeLayout {
public MonthWheel monthWheel;
public YearWheel yearWheel;
private WheelOrderUpdater wheelOrderUpdater;
private EmptyWheelUpdater emptyWheelUpdater;
public boolean requireDisplayValueUpdate = true;
public TimeZone timeZone = TimeZone.getDefault();
private DateBoundary minDate;
@ -61,11 +55,13 @@ public class PickerView extends RelativeLayout {
public PickerView() {
super(DatePickerManager.context);
View rootView = inflate(getContext(), R.layout.datepicker_view, this);
this.style = new Style(this);
this.wheelOrderUpdater = new WheelOrderUpdater(this);
this.emptyWheelUpdater = new EmptyWheelUpdater(this);
LinearLayout wheelsWrapper = (LinearLayout) rootView.findViewById(R.id.wheelsWrapper);
wheelsWrapper = (LinearLayout) rootView.findViewById(R.id.wheelsWrapper);
wheelsWrapper.setWillNotDraw(false);
locale = Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP ? Locale.forLanguageTag("en") : Locale.getDefault();
@ -106,6 +102,7 @@ public class PickerView extends RelativeLayout {
});
}
public void setMinimumDate(String date) {
minDate = new DateBoundary(this, date);
requireDisplayValueUpdate = true;
@ -126,6 +123,7 @@ public class PickerView extends RelativeLayout {
this.locale = locale;
setDateFormat();
wheelOrderUpdater.update(locale, mode);
emptyWheelUpdater.update(mode);
requireDisplayValueUpdate = true;
}
@ -177,6 +175,7 @@ public class PickerView extends RelativeLayout {
setDateFormat();
applyOnAllWheels(new UpdateVisibility());
wheelOrderUpdater.update(locale, mode);
emptyWheelUpdater.update(mode);
}
public Collection<Wheel> getVisibleWheels() {
@ -228,13 +227,32 @@ public class PickerView extends RelativeLayout {
if (maxDate == null) return null;
return maxDate.get();
}
public void setDateFormat(){
dateFormat = new SimpleDateFormat(getDateFormatTemplate(), Locale.US);
}
public void update2DigitYearStart(Calendar selectedDate){
Calendar cal = (Calendar) selectedDate.clone();
cal.add(Calendar.YEAR, -50); // subtract 50 years to hit the middle of the century
dateFormat.set2DigitYearStart(cal.getTime());
}
public void setShownCountOnEmptyWheels(int shownCount) {
int[] ids = {
R.id.emptyStart,
R.id.empty1,
R.id.empty2,
R.id.empty3,
R.id.emptyEnd
};
for (int id : ids) {
NumberPickerView view = (NumberPickerView) findViewById(id);
if(view != null) view.setShownCount(shownCount);
}
}
}

+ 1
- 7
android/src/main/java/com/henninghall/date_picker/Style.java View File

@ -40,17 +40,11 @@ class Style {
this.pickerView.applyOnAllWheels(new TextColor(color));
}
public void setWidth(int width) {
View view = pickerView.findViewById(R.id.container);
ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
layoutParams.width = width;
view.setLayoutParams(layoutParams);
}
public void setHeight(int height) {
int showCount = height / DP_PER_SHOW_SHOW_COUNT;
int oddShowCount = showCount % 2 == 0 ? showCount + 1 : showCount;
pickerView.applyOnAllWheels(new SetShowCount(oddShowCount));
pickerView.setShownCountOnEmptyWheels(oddShowCount);
}
private boolean validColor(String color){

+ 10
- 13
android/src/main/java/com/henninghall/date_picker/Utils.java View File

@ -4,6 +4,7 @@ package com.henninghall.date_picker;
import android.content.Context;
import android.content.res.Resources;
import android.text.format.DateUtils;
import android.util.Log;
import android.util.TypedValue;
import android.view.View;
@ -13,6 +14,8 @@ import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Locale;
import java.util.TimeZone;
@ -38,19 +41,13 @@ public class Utils {
return getIsoUTCFormat().format(date.getTime());
}
public static int getWheelHeight(View pickerView) {
return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 160, pickerView.getResources().getDisplayMetrics());
}
public static String localeToYmdPattern(Locale locale) {
DateFormat formatter = DateFormat.getDateInstance(DateFormat.SHORT, locale);
String pattern = ((SimpleDateFormat)formatter).toLocalizedPattern();
pattern = pattern.replaceAll("\\[", "");
pattern = pattern.replaceAll("]", "");
pattern = pattern.replaceAll(" ", "");
pattern = pattern.replaceAll("[.]", "/");
pattern = pattern.replaceAll("-", "/");
return pattern;
public static boolean monthNameBeforeMonthDate(Locale locale){
DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, locale);
GregorianCalendar calendar = new GregorianCalendar();
calendar.set(Calendar.DAY_OF_MONTH, 1);
calendar.set(Calendar.MONTH, 2);
String string = df.format(calendar.getTime());
return !string.startsWith("1") && !string.startsWith("01");
}
public static boolean isToday(Calendar cal){

+ 14
- 41
android/src/main/java/com/henninghall/date_picker/WheelOrderUpdater.java View File

@ -1,11 +1,7 @@
package com.henninghall.date_picker;
import android.os.Build;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import com.henninghall.date_picker.wheels.Wheel;
import com.henninghall.date_picker.wheels.YearWheel;
import java.util.ArrayList;
import java.util.Locale;
@ -13,7 +9,6 @@ import java.util.Locale;
public class WheelOrderUpdater
{
private final PickerView pickerView;
private String ymdPattern = "";
WheelOrderUpdater(final PickerView v) {
this.pickerView = v;
@ -21,45 +16,23 @@ public class WheelOrderUpdater
public void update(final Locale locale, final Mode mode) {
if (mode != Mode.date) return;
String lastYmdPattern = ymdPattern;
ymdPattern = Utils.localeToYmdPattern(locale);
if(lastYmdPattern.equals(ymdPattern)) return;
final ArrayList<Wheel> wheelOrder = this.ymdPatternToWheelOrder(ymdPattern);
wheelOrder.get(0).picker.setLayoutParams(getDefaultLayoutParams());
this.placeWheelRightOf(wheelOrder.get(0), wheelOrder.get(1));
this.placeWheelRightOf(wheelOrder.get(1), wheelOrder.get(2));
}
private void placeWheelRightOf(final Wheel leftWheel, final Wheel rightWheel) {
final RelativeLayout.LayoutParams params = getDefaultLayoutParams();
params.addRule(1, leftWheel.id);
if (Build.VERSION.SDK_INT >= 17) params.addRule(17, leftWheel.id);
rightWheel.picker.setLayoutParams(params);
final ArrayList<Wheel> wheelOrder = this.localeToWheelOrder(locale);
pickerView.wheelsWrapper.removeView(wheelOrder.get(0).picker);
pickerView.wheelsWrapper.removeView(wheelOrder.get(1).picker);
pickerView.wheelsWrapper.addView(wheelOrder.get(0).picker, 1); // 0 and 2 are emptyWheels
pickerView.wheelsWrapper.addView(wheelOrder.get(1).picker, 2); // 0 and 2 are emptyWheels
}
private RelativeLayout.LayoutParams getDefaultLayoutParams(){
return new RelativeLayout.LayoutParams(-2, Utils.getWheelHeight(this.pickerView));
}
private ArrayList<Wheel> ymdPatternToWheelOrder(final String ymdPattern) {
final String[] parts = ymdPattern.split("/");
private ArrayList<Wheel> localeToWheelOrder(final Locale locale) {
final ArrayList<Wheel> wheelList = new ArrayList<Wheel>();
for (final String s : parts) {
switch (s.charAt(0)) {
case 'y': {
wheelList.add(this.pickerView.yearWheel);
break;
}
case 'M': {
wheelList.add(this.pickerView.monthWheel);
break;
}
case 'd': {
wheelList.add(this.pickerView.dateWheel);
break;
}
}
if (Utils.monthNameBeforeMonthDate(locale)) {
wheelList.add(this.pickerView.dateWheel);
wheelList.add(this.pickerView.monthWheel);
}
else {
wheelList.add(this.pickerView.monthWheel);
wheelList.add(this.pickerView.dateWheel);
}
return wheelList;
}

+ 5
- 0
android/src/main/java/com/henninghall/date_picker/WheelPosition.java View File

@ -0,0 +1,5 @@
package com.henninghall.date_picker;
public enum WheelPosition {
LEFT, RIGHT, MIDDLE
}

+ 9
- 2
android/src/main/java/com/henninghall/date_picker/wheels/AmPmWheel.java View File

@ -1,11 +1,13 @@
package com.henninghall.date_picker.wheels;
import android.graphics.Paint;
import com.henninghall.date_picker.Mode;
import com.henninghall.date_picker.PickerView;
import com.henninghall.date_picker.Settings;
import com.henninghall.date_picker.Utils;
import com.henninghall.date_picker.WheelPosition;
import java.util.Calendar;
import cn.carbswang.android.numberpickerview.library.NumberPickerView;
public class AmPmWheel extends Wheel {
@ -43,4 +45,9 @@ public class AmPmWheel extends Wheel {
return Settings.usesAmPm() ? " a " : "";
}
@Override
public Paint.Align getTextAlign() {
return Paint.Align.LEFT;
}
}

+ 7
- 0
android/src/main/java/com/henninghall/date_picker/wheels/DateWheel.java View File

@ -1,5 +1,7 @@
package com.henninghall.date_picker.wheels;
import android.graphics.Paint;
import java.util.*;
import com.henninghall.date_picker.*;
@ -36,4 +38,9 @@ public class DateWheel extends Wheel
return "d";
}
@Override
public Paint.Align getTextAlign() {
return Paint.Align.RIGHT;
}
}

+ 13
- 4
android/src/main/java/com/henninghall/date_picker/wheels/DayWheel.java View File

@ -1,5 +1,7 @@
package com.henninghall.date_picker.wheels;
import android.graphics.Paint;
import com.henninghall.date_picker.Mode;
import com.henninghall.date_picker.PickerView;
import com.henninghall.date_picker.Utils;
@ -111,12 +113,19 @@ public class DayWheel extends Wheel {
@Override
public String getFormatTemplate() {
String locale = pickerView.locale.getLanguage();
if(locale == "ko")
if(locale.equals("ko"))
return "yy MMM d일 (EEE)";
if(locale == "ja" || locale.contains("zh"))
if(locale.equals("ja") || locale.contains("zh"))
return "yy MMMd日 EEE";
return "yy EEE d MMM";
if(Utils.monthNameBeforeMonthDate(pickerView.locale)){
return "yy EEE MMM d";
}
else return "yy EEE d MMM";
}
@Override
public Paint.Align getTextAlign() {
return Paint.Align.RIGHT;
}
}

+ 7
- 5
android/src/main/java/com/henninghall/date_picker/wheels/HourWheel.java View File

@ -1,15 +1,12 @@
package com.henninghall.date_picker.wheels;
import android.graphics.Paint;
import com.henninghall.date_picker.Mode;
import com.henninghall.date_picker.PickerView;
import com.henninghall.date_picker.Settings;
import com.henninghall.date_picker.Utils;
import java.util.Calendar;
import cn.carbswang.android.numberpickerview.library.NumberPickerView;
public class HourWheel extends Wheel {
public HourWheel(PickerView pickerView, int id) {
@ -41,4 +38,9 @@ public class HourWheel extends Wheel {
return Settings.usesAmPm() ? "h": "HH";
}
@Override
public Paint.Align getTextAlign() {
return Paint.Align.RIGHT;
}
}

+ 9
- 4
android/src/main/java/com/henninghall/date_picker/wheels/MinutesWheel.java View File

@ -1,12 +1,12 @@
package com.henninghall.date_picker.wheels;
import android.graphics.Paint;
import com.henninghall.date_picker.Mode;
import com.henninghall.date_picker.PickerView;
import java.util.Calendar;
import java.util.Date;
import cn.carbswang.android.numberpickerview.library.NumberPickerView;
import com.henninghall.date_picker.Settings;
import java.util.Calendar;
public class MinutesWheel extends Wheel {
@ -40,4 +40,9 @@ public class MinutesWheel extends Wheel {
return "mm";
}
@Override
public Paint.Align getTextAlign() {
return Settings.usesAmPm() ? Paint.Align.RIGHT: Paint.Align.LEFT;
}
}

+ 7
- 0
android/src/main/java/com/henninghall/date_picker/wheels/MonthWheel.java View File

@ -1,5 +1,7 @@
package com.henninghall.date_picker.wheels;
import android.graphics.Paint;
import java.text.*;
import java.util.*;
import com.henninghall.date_picker.*;
@ -35,6 +37,11 @@ public class MonthWheel extends Wheel
return "LLLL";
}
@Override
public Paint.Align getTextAlign() {
return Paint.Align.LEFT;
}
private String getUsString(Calendar cal) {
return getString(cal, Locale.US);
}

+ 5
- 3
android/src/main/java/com/henninghall/date_picker/wheels/Wheel.java View File

@ -1,15 +1,15 @@
package com.henninghall.date_picker.wheels;
import android.graphics.Paint;
import android.view.View;
import cn.carbswang.android.numberpickerview.library.NumberPickerView;
import com.henninghall.date_picker.PickerView;
import org.apache.commons.lang3.LocaleUtils;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import cn.carbswang.android.numberpickerview.library.NumberPickerView;
public abstract class Wheel {
private final Wheel self;
@ -19,6 +19,7 @@ public abstract class Wheel {
abstract void init();
public abstract boolean visible();
public abstract Paint.Align getTextAlign();
public abstract String getFormatTemplate();
ArrayList<String> values;
@ -32,6 +33,7 @@ public abstract class Wheel {
this.self = this;
this.pickerView = pickerView;
this.picker = (NumberPickerView) pickerView.findViewById(id);
picker.setTextAlign(getTextAlign());
clearValues();
picker.setOnValueChangedListener(new NumberPickerView.OnValueChangeListener() {
@Override

+ 8
- 0
android/src/main/java/com/henninghall/date_picker/wheels/YearWheel.java View File

@ -1,5 +1,7 @@
package com.henninghall.date_picker.wheels;
import android.graphics.Paint;
import com.henninghall.date_picker.Mode;
import com.henninghall.date_picker.PickerView;
@ -52,9 +54,15 @@ public class YearWheel extends Wheel
return this.pickerView.mode == Mode.date;
}
@Override
public Paint.Align getTextAlign() {
return Paint.Align.RIGHT;
}
@Override
public String getFormatTemplate() {
return "y";
}
}

+ 84
- 15
android/src/main/res/layout/datepicker_view.xml View File

@ -1,18 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:id="@+id/container"
xmlns:custom="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:custom="http://schemas.android.com/apk/res-auto">
>
<LinearLayout
android:id="@+id/wheelsWrapper"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
>
<cn.carbswang.android.numberpickerview.library.NumberPickerView
android:id="@+id/emptyStart"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
custom:npv_DividerColor="#cccccc"
custom:npv_RespondChangeOnDetached="false"
custom:npv_ShownCount="5"
custom:npv_TextColorNormal="#aaaaaa"
custom:npv_TextColorSelected="#000000"
custom:npv_TextSizeNormal="18sp"
custom:npv_TextSizeSelected="21sp"
custom:npv_WrapSelectorWheel="true"
custom:npv_ItemPaddingHorizontal="0dp"
/>
<cn.carbswang.android.numberpickerview.library.NumberPickerView
android:id="@+id/year"
android:layout_width="wrap_content"
@ -27,6 +41,21 @@
custom:npv_DividerColor="#cccccc"
custom:npv_ItemPaddingHorizontal="3dp"
/>
<cn.carbswang.android.numberpickerview.library.NumberPickerView
android:id="@+id/empty1"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
custom:npv_DividerColor="#cccccc"
custom:npv_RespondChangeOnDetached="false"
custom:npv_ShownCount="5"
custom:npv_TextColorNormal="#aaaaaa"
custom:npv_TextColorSelected="#000000"
custom:npv_TextSizeNormal="18sp"
custom:npv_TextSizeSelected="21sp"
custom:npv_WrapSelectorWheel="true"
custom:npv_ItemPaddingHorizontal="0dp"
/>
<cn.carbswang.android.numberpickerview.library.NumberPickerView
android:id="@+id/month"
android:layout_width="wrap_content"
@ -41,6 +70,21 @@
custom:npv_DividerColor="#cccccc"
custom:npv_ItemPaddingHorizontal="3dp"
/>
<cn.carbswang.android.numberpickerview.library.NumberPickerView
android:id="@+id/empty2"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
custom:npv_DividerColor="#cccccc"
custom:npv_RespondChangeOnDetached="false"
custom:npv_ShownCount="5"
custom:npv_TextColorNormal="#aaaaaa"
custom:npv_TextColorSelected="#000000"
custom:npv_TextSizeNormal="18sp"
custom:npv_TextSizeSelected="21sp"
custom:npv_WrapSelectorWheel="true"
custom:npv_ItemPaddingHorizontal="0dp"
/>
<cn.carbswang.android.numberpickerview.library.NumberPickerView
android:id="@+id/date"
android:layout_width="wrap_content"
@ -56,10 +100,24 @@
custom:npv_ItemPaddingHorizontal="3dp"
/>
<cn.carbswang.android.numberpickerview.library.NumberPickerView
android:id="@+id/day"
android:id="@+id/empty3"
android:layout_width="0dp"
android:layout_weight="4"
android:layout_weight="1"
android:layout_height="match_parent"
custom:npv_DividerColor="#cccccc"
custom:npv_RespondChangeOnDetached="false"
custom:npv_ShownCount="5"
custom:npv_TextColorNormal="#aaaaaa"
custom:npv_TextColorSelected="#000000"
custom:npv_TextSizeNormal="18sp"
custom:npv_TextSizeSelected="21sp"
custom:npv_WrapSelectorWheel="true"
custom:npv_ItemPaddingHorizontal="0dp"
/>
<cn.carbswang.android.numberpickerview.library.NumberPickerView
android:id="@+id/day"
android:layout_height="match_parent"
android:layout_width="wrap_content"
custom:npv_ShownCount="5"
custom:npv_RespondChangeOnDetached="false"
custom:npv_TextSizeNormal="18sp"
@ -68,13 +126,12 @@
custom:npv_TextColorSelected="#000000"
custom:npv_TextColorNormal="#aaaaaa"
custom:npv_DividerColor="#cccccc"
custom:npv_ItemPaddingHorizontal="3dp"/>
custom:npv_ItemPaddingHorizontal="3dp"
/>
<cn.carbswang.android.numberpickerview.library.NumberPickerView
android:id="@+id/hour"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:layout_width="wrap_content"
custom:npv_DividerColor="#cccccc"
custom:npv_RespondChangeOnDetached="false"
custom:npv_ShownCount="5"
@ -88,8 +145,7 @@
<cn.carbswang.android.numberpickerview.library.NumberPickerView
android:id="@+id/minutes"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
custom:npv_DividerColor="#cccccc"
custom:npv_RespondChangeOnDetached="false"
@ -104,8 +160,7 @@
<cn.carbswang.android.numberpickerview.library.NumberPickerView
android:id="@+id/ampm"
android:layout_weight="1.5"
android:layout_width="0dp"
android:layout_width="wrap_content"
android:layout_height="match_parent"
custom:npv_DividerColor="#cccccc"
custom:npv_RespondChangeOnDetached="false"
@ -116,9 +171,23 @@
custom:npv_TextSizeSelected="21sp"
custom:npv_WrapSelectorWheel="true"
custom:npv_ItemPaddingHorizontal="3dp"
android:foregroundGravity="center"
/>
<cn.carbswang.android.numberpickerview.library.NumberPickerView
android:id="@+id/emptyEnd"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
custom:npv_DividerColor="#cccccc"
custom:npv_RespondChangeOnDetached="false"
custom:npv_ShownCount="5"
custom:npv_TextColorNormal="#aaaaaa"
custom:npv_TextColorSelected="#000000"
custom:npv_TextSizeNormal="18sp"
custom:npv_TextSizeSelected="21sp"
custom:npv_WrapSelectorWheel="true"
custom:npv_ItemPaddingHorizontal="0dp"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"

+ 0
- 9
example-react-native-v0.59.9/index.js View File

@ -1,9 +0,0 @@
/**
* @format
*/
import { AppRegistry } from "react-native";
import App from "./App";
import { name as appName } from "./app.json";
AppRegistry.registerComponent(appName, () => App);

+ 0
- 3
example/.babelrc View File

@ -1,3 +0,0 @@
{
"presets": ["react-native"]
}

+ 0
- 358
example/android/.gitignore View File

@ -1,358 +0,0 @@
# Created by https://www.gitignore.io/api/xcode,android,reactnative,androidstudio
### Android ###
# Built application files
*.apk
*.ap_
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# Intellij
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/dictionaries
.idea/libraries
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Freeline
freeline.py
freeline/
freeline_project_description.json
### Android Patch ###
gen-external-apklibs
### AndroidStudio ###
# Covers files to be ignored for android development using Android Studio.
# Built application files
# Files for the ART/Dalvik VM
# Java class files
# Generated files
# Gradle files
.gradle
# Signing files
.signing/
# Local configuration file (sdk path, etc)
# Proguard folder generated by Eclipse
# Log Files
# Android Studio
/*/build/
/*/local.properties
/*/out
/*/*/build
/*/*/production
*.ipr
*~
*.swp
# Android Patch
# External native build folder generated in Android Studio 2.2 and later
# NDK
obj/
# IntelliJ IDEA
*.iws
/out/
# User-specific configurations
.idea/libraries/
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/misc.xml
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/vcs.xml
.idea/jsLibraryMappings.xml
.idea/datasources.xml
.idea/dataSources.ids
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
# OS-specific files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# Legacy Eclipse project files
.classpath
.project
.cproject
.settings/
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.war
*.ear
# virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)
hs_err_pid*
## Plugin-specific files:
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Mongo Explorer plugin
.idea/mongoSettings.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
### AndroidStudio Patch ###
!/gradle/wrapper/gradle-wrapper.jar
### ReactNative ###
# React Native Stack Base
### ReactNative.Android Stack ###
# Built application files
# Files for the ART/Dalvik VM
# Java class files
# Generated files
# Gradle files
# Local configuration file (sdk path, etc)
# Proguard folder generated by Eclipse
# Log Files
# Android Studio Navigation editor temp files
# Android Studio captures folder
# Intellij
# External native build folder generated in Android Studio 2.2 and later
# Freeline
### ReactNative.Buck Stack ###
buck-out/
.buckconfig.local
.buckd/
.buckversion
.fakebuckversion
### ReactNative.Xcode Stack ###
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
DerivedData/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint
### ReactNative.Node Stack ###
# Logs
logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Typescript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
### ReactNative.Gradle Stack ###
**/build/
# Ignore Gradle GUI config
gradle-app.setting
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
# Cache of project
.gradletasknamecache
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties
### ReactNative.Linux Stack ###
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
### ReactNative.macOS Stack ###
*.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.TemporaryItems
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Xcode ###
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
## Various settings
## Other
### Xcode Patch ###
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcworkspace/contents.xcworkspacedata
/*.gcno
# End of https://www.gitignore.io/api/xcode,android,reactnative,androidstudio

+ 0
- 3
example/android/app/src/main/res/values/strings.xml View File

@ -1,3 +0,0 @@
<resources>
<string name="app_name">DatePickerExample</string>
</resources>

BIN
example/android/gradle/wrapper/gradle-wrapper.jar View File


+ 0
- 7
example/android/settings.gradle View File

@ -1,7 +0,0 @@
rootProject.name = 'DatePickerExample'
include ':react-native-date-picker'
project(':react-native-date-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-date-picker/android')
include ':react-native-device-info'
project(':react-native-device-info').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-device-info/android')
include ':app'

+ 0
- 4
example/app.json View File

@ -1,4 +0,0 @@
{
"name": "DatePickerExample",
"displayName": "DatePickerExample"
}

+ 0
- 129
example/ios/DatePickerExample.xcodeproj/xcshareddata/xcschemes/DatePickerExample-tvOS.xcscheme View File

@ -1,129 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "NO"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D2A28121D9B038B00D4039D"
BuildableName = "libReact.a"
BlueprintName = "React-tvOS"
ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
BuildableName = "DatePickerExample-tvOS.app"
BlueprintName = "DatePickerExample-tvOS"
ReferencedContainer = "container:DatePickerExample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
BuildableName = "DatePickerExample-tvOSTests.xctest"
BlueprintName = "DatePickerExample-tvOSTests"
ReferencedContainer = "container:DatePickerExample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
BuildableName = "DatePickerExample-tvOSTests.xctest"
BlueprintName = "DatePickerExample-tvOSTests"
ReferencedContainer = "container:DatePickerExample.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
BuildableName = "DatePickerExample-tvOS.app"
BlueprintName = "DatePickerExample-tvOS"
ReferencedContainer = "container:DatePickerExample.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
BuildableName = "DatePickerExample-tvOS.app"
BlueprintName = "DatePickerExample-tvOS"
ReferencedContainer = "container:DatePickerExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
BuildableName = "DatePickerExample-tvOS.app"
BlueprintName = "DatePickerExample-tvOS"
ReferencedContainer = "container:DatePickerExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

+ 0
- 131
example/ios/DatePickerExample.xcodeproj/xcshareddata/xcschemes/DatePickerExample.xcscheme View File

@ -1,131 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0620"
version = "1.3">
<BuildAction
parallelizeBuildables = "NO"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
BuildableName = "libReact.a"
BlueprintName = "React"
ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "DatePickerExample.app"
BlueprintName = "DatePickerExample"
ReferencedContainer = "container:DatePickerExample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "DatePickerExampleTests.xctest"
BlueprintName = "DatePickerExampleTests"
ReferencedContainer = "container:DatePickerExample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "DatePickerExampleTests.xctest"
BlueprintName = "DatePickerExampleTests"
ReferencedContainer = "container:DatePickerExample.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "DatePickerExample.app"
BlueprintName = "DatePickerExample"
ReferencedContainer = "container:DatePickerExample.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "DatePickerExample.app"
BlueprintName = "DatePickerExample"
ReferencedContainer = "container:DatePickerExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "DatePickerExample.app"
BlueprintName = "DatePickerExample"
ReferencedContainer = "container:DatePickerExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

+ 0
- 24
example/ios/DatePickerExampleTests/Info.plist View File

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

+ 0
- 25
example/package.json View File

@ -1,25 +0,0 @@
{
"name": "DatePickerExample",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"moment": "^2.22.1",
"react": "16.4.1",
"react-native": "0.56.0",
"react-native-date-picker": "^2.4.2",
"react-native-device-info": "^2.1.2"
},
"devDependencies": {
"babel-jest": "22.4.3",
"babel-preset-react-native": "5",
"jest": "22.4.3",
"react-test-renderer": "16.3.1"
},
"jest": {
"preset": "react-native"
}
}

+ 0
- 5529
example/yarn.lock
File diff suppressed because it is too large
View File


example-cocoapods/.buckconfig → examples/advanced/.buckconfig View File


example-react-native-v0.59.8/.flowconfig → examples/advanced/.flowconfig View File


example-cocoapods/.gitattributes → examples/advanced/.gitattributes View File


example-cocoapods/.gitignore → examples/advanced/.gitignore View File


example-cocoapods/.watchmanconfig → examples/advanced/.watchmanconfig View File


example-react-native-v0.59.8/__tests__/App-test.js → examples/advanced/__tests__/App-test.js View File


example-react-native-v0.59.9/android/app/BUCK → examples/advanced/android/app/BUCK View File


example-react-native-v0.59.9/android/app/build.gradle → examples/advanced/android/app/build.gradle View File


example-react-native-v0.59.8/android/app/build_defs.bzl → examples/advanced/android/app/build_defs.bzl View File


example-cocoapods/android/app/proguard-rules.pro → examples/advanced/android/app/proguard-rules.pro View File


example-react-native-v0.59.8/android/app/src/debug/AndroidManifest.xml → examples/advanced/android/app/src/debug/AndroidManifest.xml View File


example-react-native-v0.59.9/android/app/src/main/AndroidManifest.xml → examples/advanced/android/app/src/main/AndroidManifest.xml View File


example-react-native-v0.59.9/android/app/src/main/java/com/rn599/MainActivity.java → examples/advanced/android/app/src/main/java/com/rn599/MainActivity.java View File


example-react-native-v0.59.9/android/app/src/main/java/com/rn599/MainApplication.java → examples/advanced/android/app/src/main/java/com/rn599/MainApplication.java View File


example-cocoapods/android/app/src/main/res/mipmap-hdpi/ic_launcher.png → examples/advanced/android/app/src/main/res/mipmap-hdpi/ic_launcher.png View File


example-cocoapods/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png → examples/advanced/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png View File


example-cocoapods/android/app/src/main/res/mipmap-mdpi/ic_launcher.png → examples/advanced/android/app/src/main/res/mipmap-mdpi/ic_launcher.png View File


example-cocoapods/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png → examples/advanced/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png View File


example-cocoapods/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png → examples/advanced/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png View File


example-cocoapods/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png → examples/advanced/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png View File


example-cocoapods/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png → examples/advanced/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png View File


example-cocoapods/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png → examples/advanced/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png View File


example-cocoapods/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png → examples/advanced/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png View File


example-cocoapods/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png → examples/advanced/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png View File


example-react-native-v0.59.9/android/app/src/main/res/values/strings.xml → examples/advanced/android/app/src/main/res/values/strings.xml View File


example-cocoapods/android/app/src/main/res/values/styles.xml → examples/advanced/android/app/src/main/res/values/styles.xml View File


example-react-native-v0.59.9/android/build.gradle → examples/advanced/android/build.gradle View File


example-cocoapods/android/gradle.properties → examples/advanced/android/gradle.properties View File


example-react-native-v0.59.9/android/gradle/wrapper/gradle-wrapper.jar → examples/advanced/android/gradle/wrapper/gradle-wrapper.jar View File


example-react-native-v0.59.9/android/gradle/wrapper/gradle-wrapper.properties → examples/advanced/android/gradle/wrapper/gradle-wrapper.properties View File


example-react-native-v0.59.9/android/gradlew → examples/advanced/android/gradlew View File


example-react-native-v0.59.9/android/gradlew.bat → examples/advanced/android/gradlew.bat View File


example-cocoapods/android/keystores/BUCK → examples/advanced/android/keystores/BUCK View File


example-cocoapods/android/keystores/debug.keystore.properties → examples/advanced/android/keystores/debug.keystore.properties View File


example-react-native-v0.59.9/android/settings.gradle → examples/advanced/android/settings.gradle View File


example-react-native-v0.59.9/app.json → examples/advanced/app.json View File


example-react-native-v0.59.8/babel.config.js → examples/advanced/babel.config.js View File


example/index.js → examples/advanced/index.js View File

@ -1,4 +1,4 @@
import { AppRegistry } from 'react-native'
import App from './src/App'
AppRegistry.registerComponent('DatePickerExample', () => App)
AppRegistry.registerComponent('rn599', () => App)

example-cocoapods/ios/ExampleCocoapods-tvOS/Info.plist → examples/advanced/ios/rn599-tvOS/Info.plist View File


example-cocoapods/ios/ExampleCocoapods-tvOSTests/Info.plist → examples/advanced/ios/rn599-tvOSTests/Info.plist View File


example-react-native-v0.59.9/ios/rn599.xcodeproj/project.pbxproj → examples/advanced/ios/rn599.xcodeproj/project.pbxproj View File

@ -37,9 +37,9 @@
2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; };
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
E8014004F25F4816AFD2B1A9 /* libRNDatePicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 01A0F570A8B443D6A2055DE0 /* libRNDatePicker.a */; };
ED297163215061F000B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED297162215061F000B7C4FE /* JavaScriptCore.framework */; };
ED2971652150620600B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED2971642150620600B7C4FE /* JavaScriptCore.framework */; };
E8014004F25F4816AFD2B1A9 /* libRNDatePicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 01A0F570A8B443D6A2055DE0 /* libRNDatePicker.a */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@ -176,19 +176,40 @@
remoteGlobalIDString = 3D383D621EBD27B9005632C8;
remoteInfo = "double-conversion-tvOS";
};
2DF0FFEA2056DD460020B375 /* PBXContainerItemProxy */ = {
2E0AB03222D26E46001735C6 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = EDEBC6D6214B3E7000DD5AC8;
remoteInfo = jsi;
};
2E0AB03422D26E46001735C6 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = EDEBC73B214B45A300DD5AC8;
remoteInfo = jsiexecutor;
};
2E0AB03622D26E46001735C6 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 9936F3131F5F2E4B0010BF04;
remoteInfo = privatedata;
remoteGlobalIDString = ED296FB6214C9A0900B7C4FE;
remoteInfo = "jsi-tvOS";
};
2DF0FFEC2056DD460020B375 /* PBXContainerItemProxy */ = {
2E0AB03822D26E46001735C6 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 9936F32F1F5F2E5B0010BF04;
remoteInfo = "privatedata-tvOS";
remoteGlobalIDString = ED296FEE214C9CF800B7C4FE;
remoteInfo = "jsiexecutor-tvOS";
};
2E0AB03F22D26E48001735C6 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = E60356E3155D453586B1A3EA /* RNDatePicker.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = DA5891D81BA9A9FC002B4DB2;
remoteInfo = RNDatePicker;
};
3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
@ -267,20 +288,6 @@
remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4;
remoteInfo = "cxxreact-tvOS";
};
3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4;
remoteInfo = jschelpers;
};
3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4;
remoteInfo = "jschelpers-tvOS";
};
5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
@ -328,6 +335,7 @@
00E356EE1AD99517003FC87E /* rn599Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = rn599Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
00E356F21AD99517003FC87E /* rn599Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = rn599Tests.m; sourceTree = "<group>"; };
01A0F570A8B443D6A2055DE0 /* libRNDatePicker.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNDatePicker.a; sourceTree = "<group>"; };
139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = "<group>"; };
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* rn599.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = rn599.app; sourceTree = BUILT_PRODUCTS_DIR; };
@ -345,10 +353,9 @@
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; };
E60356E3155D453586B1A3EA /* RNDatePicker.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNDatePicker.xcodeproj; path = "../node_modules/react-native-date-picker/ios/RNDatePicker.xcodeproj"; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
E60356E3155D453586B1A3EA /* RNDatePicker.xcodeproj */ = {isa = PBXFileReference; name = "RNDatePicker.xcodeproj"; path = "../node_modules/react-native-date-picker/ios/RNDatePicker.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
01A0F570A8B443D6A2055DE0 /* libRNDatePicker.a */ = {isa = PBXFileReference; name = "libRNDatePicker.a"; path = "libRNDatePicker.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -394,6 +401,7 @@
2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */,
2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */,
2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */,
F54EB68D9B3A497AA60897E9 /* libRNDeviceInfo-tvOS.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -510,16 +518,16 @@
3DAD3EA71DF850E9000B6D8A /* libyoga.a */,
3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */,
3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */,
3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */,
3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */,
2DF0FFDF2056DD460020B375 /* libjsinspector.a */,
2DF0FFE12056DD460020B375 /* libjsinspector-tvOS.a */,
2DF0FFE32056DD460020B375 /* libthird-party.a */,
2DF0FFE52056DD460020B375 /* libthird-party.a */,
2DF0FFE72056DD460020B375 /* libdouble-conversion.a */,
2DF0FFE92056DD460020B375 /* libdouble-conversion.a */,
2DF0FFEB2056DD460020B375 /* libprivatedata.a */,
2DF0FFED2056DD460020B375 /* libprivatedata-tvOS.a */,
2E0AB03322D26E46001735C6 /* libjsi.a */,
2E0AB03522D26E46001735C6 /* libjsiexecutor.a */,
2E0AB03722D26E46001735C6 /* libjsi-tvOS.a */,
2E0AB03922D26E46001735C6 /* libjsiexecutor-tvOS.a */,
);
name = Products;
sourceTree = "<group>";
@ -534,6 +542,24 @@
name = Frameworks;
sourceTree = "<group>";
};
2E0AB00C22D26E45001735C6 /* Recovered References */ = {
isa = PBXGroup;
children = (
01A0F570A8B443D6A2055DE0 /* libRNDatePicker.a */,
28E610B91645431A965F0EA1 /* libRNDeviceInfo.a */,
B34295A6E45E44F7A28556A3 /* libRNDeviceInfo-tvOS.a */,
);
name = "Recovered References";
sourceTree = "<group>";
};
2E0AB03A22D26E47001735C6 /* Products */ = {
isa = PBXGroup;
children = (
2E0AB04022D26E48001735C6 /* libRNDatePicker.a */,
);
name = Products;
sourceTree = "<group>";
};
5E91572E1DD0AC6500FF2AA8 /* Products */ = {
isa = PBXGroup;
children = (
@ -589,6 +615,7 @@
00E356EF1AD99517003FC87E /* rn599Tests */,
83CBBA001A601CBA00E9B192 /* Products */,
2D16E6871FA4F8E400B85C8A /* Frameworks */,
2E0AB00C22D26E45001735C6 /* Recovered References */,
);
indentWidth = 2;
sourceTree = "<group>";
@ -703,6 +730,9 @@
CreatedOnToolsVersion = 6.2;
TestTargetID = 13B07F861A680F5B00A75B9A;
};
13B07F861A680F5B00A75B9A = {
DevelopmentTeam = BJRNYA69VT;
};
2D02E47A1E0B4A5D006451C7 = {
CreatedOnToolsVersion = 8.2.1;
ProvisioningStyle = Automatic;
@ -719,6 +749,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
@ -774,6 +805,10 @@
ProductGroup = 146834001AC3E56700842450 /* Products */;
ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
},
{
ProductGroup = 2E0AB03A22D26E47001735C6 /* Products */;
ProjectRef = E60356E3155D453586B1A3EA /* RNDatePicker.xcodeproj */;
},
);
projectRoot = "";
targets = (
@ -905,18 +940,46 @@
remoteRef = 2DF0FFE82056DD460020B375 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
2DF0FFEB2056DD460020B375 /* libprivatedata.a */ = {
2E0AB03322D26E46001735C6 /* libjsi.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libjsi.a;
remoteRef = 2E0AB03222D26E46001735C6 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
2E0AB03522D26E46001735C6 /* libjsiexecutor.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libjsiexecutor.a;
remoteRef = 2E0AB03422D26E46001735C6 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
2E0AB03722D26E46001735C6 /* libjsi-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libjsi-tvOS.a";
remoteRef = 2E0AB03622D26E46001735C6 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
2E0AB03922D26E46001735C6 /* libjsiexecutor-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libjsiexecutor-tvOS.a";
remoteRef = 2E0AB03822D26E46001735C6 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
2E0AB04022D26E48001735C6 /* libRNDatePicker.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libprivatedata.a;
remoteRef = 2DF0FFEA2056DD460020B375 /* PBXContainerItemProxy */;
path = libRNDatePicker.a;
remoteRef = 2E0AB03F22D26E48001735C6 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
2DF0FFED2056DD460020B375 /* libprivatedata-tvOS.a */ = {
2E0AB04622D26E48001735C6 /* libRNDeviceInfo-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libprivatedata-tvOS.a";
remoteRef = 2DF0FFEC2056DD460020B375 /* PBXContainerItemProxy */;
path = "libRNDeviceInfo-tvOS.a";
remoteRef = 2E0AB04522D26E48001735C6 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = {
@ -996,20 +1059,6 @@
remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libjschelpers.a;
remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libjschelpers.a;
remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
@ -1183,9 +1232,16 @@
"DEBUG=1",
"$(inherited)",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
INFOPLIST_FILE = rn599Tests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
);
OTHER_LDFLAGS = (
"-ObjC",
"-lc++",
@ -1193,14 +1249,6 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/rn599.app/rn599";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
};
name = Debug;
};
@ -1209,9 +1257,16 @@
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
COPY_PHASE_STRIP = NO;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
INFOPLIST_FILE = rn599Tests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
);
OTHER_LDFLAGS = (
"-ObjC",
"-lc++",
@ -1219,14 +1274,6 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/rn599.app/rn599";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
};
name = Release;
};
@ -1236,6 +1283,11 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = BJRNYA69VT;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
INFOPLIST_FILE = rn599/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = (
@ -1246,10 +1298,6 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = rn599;
VERSIONING_SYSTEM = "apple-generic";
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
};
name = Debug;
};
@ -1258,6 +1306,11 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = BJRNYA69VT;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
INFOPLIST_FILE = rn599/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = (
@ -1268,10 +1321,6 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = rn599;
VERSIONING_SYSTEM = "apple-generic";
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
};
name = Release;
};
@ -1287,8 +1336,15 @@
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
INFOPLIST_FILE = "rn599-tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
);
OTHER_LDFLAGS = (
"-ObjC",
"-lc++",
@ -1298,14 +1354,6 @@
SDKROOT = appletvos;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.2;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
};
name = Debug;
};
@ -1321,8 +1369,15 @@
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_NO_COMMON_BLOCKS = YES;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
INFOPLIST_FILE = "rn599-tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
);
OTHER_LDFLAGS = (
"-ObjC",
"-lc++",
@ -1332,14 +1387,6 @@
SDKROOT = appletvos;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.2;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
};
name = Release;
};
@ -1354,8 +1401,15 @@
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
INFOPLIST_FILE = "rn599-tvOSTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
);
OTHER_LDFLAGS = (
"-ObjC",
"-lc++",
@ -1365,14 +1419,6 @@
SDKROOT = appletvos;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/rn599-tvOS.app/rn599-tvOS";
TVOS_DEPLOYMENT_TARGET = 10.1;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
};
name = Debug;
};
@ -1387,8 +1433,15 @@
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_NO_COMMON_BLOCKS = YES;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
INFOPLIST_FILE = "rn599-tvOSTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
);
OTHER_LDFLAGS = (
"-ObjC",
"-lc++",
@ -1398,14 +1451,6 @@
SDKROOT = appletvos;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/rn599-tvOS.app/rn599-tvOS";
TVOS_DEPLOYMENT_TARGET = 10.1;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-date-picker/ios/RNDatePicker",
);
};
name = Release;
};

example-react-native-v0.59.9/ios/rn599.xcodeproj/xcshareddata/xcschemes/rn599-tvOS.xcscheme → examples/advanced/ios/rn599.xcodeproj/xcshareddata/xcschemes/rn599-tvOS.xcscheme View File


example-react-native-v0.59.9/ios/rn599.xcodeproj/xcshareddata/xcschemes/rn599.xcscheme → examples/advanced/ios/rn599.xcodeproj/xcshareddata/xcschemes/rn599.xcscheme View File


example-react-native-v0.59.8/ios/rn598/AppDelegate.h → examples/advanced/ios/rn599/AppDelegate.h View File


example-react-native-v0.59.9/ios/rn599/AppDelegate.m → examples/advanced/ios/rn599/AppDelegate.m View File


example-react-native-v0.59.9/ios/rn599/Base.lproj/LaunchScreen.xib → examples/advanced/ios/rn599/Base.lproj/LaunchScreen.xib View File


example/ios/DatePickerExample/Images.xcassets/AppIcon.appiconset/Contents.json → examples/advanced/ios/rn599/Images.xcassets/AppIcon.appiconset/Contents.json View File


example-cocoapods/ios/ExampleCocoapods/Images.xcassets/Contents.json → examples/advanced/ios/rn599/Images.xcassets/Contents.json View File


example-react-native-v0.59.9/ios/rn599/Info.plist → examples/advanced/ios/rn599/Info.plist View File


example-react-native-v0.59.8/ios/rn598/main.m → examples/advanced/ios/rn599/main.m View File


example-cocoapods/ios/ExampleCocoapodsTests/Info.plist → examples/advanced/ios/rn599Tests/Info.plist View File


example-react-native-v0.59.9/ios/rn599Tests/rn599Tests.m → examples/advanced/ios/rn599Tests/rn599Tests.m View File


example-react-native-v0.59.8/metro.config.js → examples/advanced/metro.config.js View File


example-react-native-v0.59.9/package.json → examples/advanced/package.json View File

@ -9,7 +9,7 @@
"dependencies": {
"react": "16.8.3",
"react-native": "0.59.9",
"react-native-date-picker": "^2.4.2"
"react-native-date-picker": "henninghall/react-native-date-picker#master"
},
"devDependencies": {
"@babel/core": "^7.4.5",

example/src/App.js → examples/advanced/src/App.js View File

@ -58,10 +58,10 @@ export default class App extends Component {
const styles = StyleSheet.create({
container: {
paddingTop: 15,
borderWidth:1,
},
content: {
alignItems: 'center',
// flex: 1,
},
text: {
color: 'dodgerblue',

example/src/PropButton.js → examples/advanced/src/PropButton.js View File


example/src/PropSlider.js → examples/advanced/src/PropSlider.js View File


example/src/exampleKeys.js → examples/advanced/src/exampleKeys.js View File


example/src/examples.js → examples/advanced/src/examples.js View File


example/src/examples/Advanced.js → examples/advanced/src/examples/Advanced.js View File

@ -1,7 +1,6 @@
import React, { Component } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import DatePicker from 'react-native-date-picker';
import DeviceInfo from 'react-native-device-info';
import DateChange from '../propPickers/DateChange';
import FadeToColor from '../propPickers/FadeToColor';
import LocalePicker from '../propPickers/LocalePicker';
@ -29,7 +28,7 @@ export default class Advanced extends Component {
searchTerm: '',
textColor: '#000000',
selectedProp: 'mode',
locale: DeviceInfo.getDeviceLocale(),
locale: 'en-US',
mode: 'datetime',
minDate: defaultMinDate,
maxDate: defaultMaxDate,

example/src/examples/DateMode.js → examples/advanced/src/examples/DateMode.js View File


example/src/examples/Minimal.js → examples/advanced/src/examples/Minimal.js View File


example/src/examples/TimeMode.js → examples/advanced/src/examples/TimeMode.js View File


example/src/locales.js → examples/advanced/src/locales.js View File


example/src/propPickers/DateChange.js → examples/advanced/src/propPickers/DateChange.js View File


example/src/propPickers/FadeToColor.js → examples/advanced/src/propPickers/FadeToColor.js View File


example/src/propPickers/LocalePicker.js → examples/advanced/src/propPickers/LocalePicker.js View File


example/src/propPickers/MinMaxDateChange.js → examples/advanced/src/propPickers/MinMaxDateChange.js View File


example/src/propPickers/MinuteInterval.js → examples/advanced/src/propPickers/MinuteInterval.js View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save