react-native/React/Base
Robert Paul fd9c3618fc - Adding locale prop to DatePickerIOS
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

While building a React Native application, I've come across the use case of wanting to set a specific locale for DatePickers irrespective of the users OS region setting. Since this is a feature available to native DatePicker components, I think it would be helpful to expose this in React Native as well.

Testing can be done by passing a `locale` prop to a DatePickerIOS. Example:

```
<DatePickerIOS
  date={this.state.date}
  mode="date"
  locale="fr_FR"
  onDateChange={date => this.setState({ date: date })}
/>
```

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAl  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
[IOS][ENHANCEMENT][DatePickerIOS] - Adding a locale prop.
Closes https://github.com/facebook/react-native/pull/16639

Differential Revision: D6241981

Pulled By: hramos

fbshipit-source-id: 77b1b85c09f3e12d6b3e103b3d1ffd1f12e2cea9
2017-11-04 14:40:24 -07:00
..
RCTAssert.h Remove deprecated RCTAssert aliases 2017-07-07 12:21:59 -07:00
RCTAssert.m Display JS exceptions and stacks in a red box. 2016-06-30 19:43:28 -07:00
RCTBatchedBridge.mm Add __autoreleasing paramters to fix block-capture-autoreleasing warning 2017-10-31 09:17:24 -07:00
RCTBridge+Private.h Thread the JSI runtime descriptor up into the RCTDevMenu title 2017-09-05 15:02:19 -07:00
RCTBridge.h Remove the experimental concept of whitelisted modules 2017-10-25 08:20:48 -07:00
RCTBridge.m Remove the experimental concept of whitelisted modules 2017-10-25 08:20:48 -07:00
RCTBridgeDelegate.h bundledSourceURLForBridge always return bundle path 2017-11-03 14:16:40 -07:00
RCTBridgeMethod.h Replace exported method registration with statically allocated struct 2017-07-24 07:01:53 -07:00
RCTBridgeModule.h iOS: introduce RCT_EXPORT_SYNCHRONOUS_TYPED_METHOD() macro to provide the return type of a sync method 2017-10-17 06:15:13 -07:00
RCTBundleURLProvider.h bundledSourceURLForBridge always return bundle path 2017-11-03 14:16:40 -07:00
RCTBundleURLProvider.m bundledSourceURLForBridge always return bundle path 2017-11-03 14:16:40 -07:00
RCTConvert.h - Adding locale prop to DatePickerIOS 2017-11-04 14:40:24 -07:00
RCTConvert.m - Adding locale prop to DatePickerIOS 2017-11-04 14:40:24 -07:00
RCTCxxConvert.h Add support for Cxx objects as arguments to native modules 2017-08-14 05:22:17 -07:00
RCTCxxConvert.m Add support for Cxx objects as arguments to native modules 2017-08-14 05:22:17 -07:00
RCTDefines.h Unify sampling profiler and reload logic by leveraging RCTPackagerConnection 2017-10-04 19:17:06 -07:00
RCTDisplayLink.h Pull CADisplayLink into a separate file 2016-03-29 19:53:20 -07:00
RCTDisplayLink.m Remove last arg from RCTProfileEnd, make macro's function-like 2016-09-05 11:13:33 -07:00
RCTErrorCustomizer.h Add ability to customize error messages and stacks within the iOS redbox 2016-07-18 11:28:36 -07:00
RCTErrorInfo.h Add ability to customize error messages and stacks within the iOS redbox 2016-07-18 11:28:36 -07:00
RCTErrorInfo.m Add ability to customize error messages and stacks within the iOS redbox 2016-07-18 11:28:36 -07:00
RCTEventDispatcher.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTEventDispatcher.m Fix potential retain cycles in Animated iOS 2017-10-23 13:20:59 -07:00
RCTFrameUpdate.h Pause JS DisplayLink if nothing to process. 2015-09-29 09:22:10 -07:00
RCTFrameUpdate.m Ran Convert > To Modern Objective C Syntax 2015-08-25 01:08:49 -08:00
RCTImageSource.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTImageSource.m Revert D5197885 to unbreak Internal App 2017-06-23 13:05:49 -07:00
RCTInvalidating.h Remove isValid from RCTInvalidating 2015-08-14 01:57:18 -08:00
RCTJSCErrorHandling.h Tease apart React and RCTBatchedBridge targets 2017-03-21 18:31:23 -07:00
RCTJSCErrorHandling.mm More verbose error messages for iOS 2017-04-18 14:19:13 -07:00
RCTJSEnvironment.h Make RCTSamplingProfilerPackagerMethod not depend on RCTBridge 2017-06-15 12:07:34 -07:00
RCTJSStackFrame.h Class for JS stack frames instead of dictionaries 2016-07-11 06:13:32 -07:00
RCTJSStackFrame.m Redo error handling on iOS 2017-10-05 13:31:55 -07:00
RCTJavaScriptExecutor.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTJavaScriptLoader.h add files changed count to reload metrics 2017-08-31 05:34:48 -07:00
RCTJavaScriptLoader.mm Fix Content-Type header checking of React/RCTJavascriptLoader.mm #15791 2017-09-19 19:50:07 -07:00
RCTKeyCommands.h Add Shortcut "Double R" to Reload JS in iOS 2016-06-01 03:43:27 -07:00
RCTKeyCommands.m Fix format warnings for clang 5.0 2017-09-25 10:30:53 -07:00
RCTLog.h Replacing all instances of [UIApplication sharedApplication] wi… 2017-04-01 03:34:41 -07:00
RCTLog.mm Replacing all instances of [UIApplication sharedApplication] wi… 2017-04-01 03:34:41 -07:00
RCTManagedPointer.h RCTManagedPointer fix ups 2017-09-01 08:08:06 -07:00
RCTManagedPointer.mm Add support for Cxx objects as arguments to native modules 2017-08-14 05:22:17 -07:00
RCTModuleData.h Merge allowOffMainQueueRegistration and requiresMainQueueSetup 2017-07-17 03:45:30 -07:00
RCTModuleData.mm Improve RCTCxxBridge invalidation 2017-09-11 04:30:31 -07:00
RCTModuleMethod.h Replace exported method registration with statically allocated struct 2017-07-24 07:01:53 -07:00
RCTModuleMethod.mm Return NSString instead of SEL 2017-11-03 16:31:31 -07:00
RCTMultipartDataTask.h Show bundle download progress on iOS 2017-08-14 11:05:35 -07:00
RCTMultipartDataTask.m Show bundle download progress on iOS 2017-08-14 11:05:35 -07:00
RCTMultipartStreamReader.h Show bundle download progress on iOS 2017-08-14 11:05:35 -07:00
RCTMultipartStreamReader.m Change intValue -> integerValue in RCTMultipartStreamReader 2017-09-05 10:02:44 -07:00
RCTNullability.h Replaced RegExp method parser with recursive descent 2015-12-10 10:12:29 -08:00
RCTParserUtils.h Add support for Cxx objects as arguments to native modules 2017-08-14 05:22:17 -07:00
RCTParserUtils.m Allow Cxx references to be used in native module's method signature 2017-09-07 09:17:04 -07:00
RCTPerformanceLogger.h Refactor measuring native requires 2016-09-09 15:28:44 -07:00
RCTPerformanceLogger.m Refactor measuring native requires 2016-09-09 15:28:44 -07:00
RCTPlatform.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTPlatform.m Move JS-native version check to its own module + unit tests + prefix Obj-C macro w/RCT 2017-10-16 14:30:34 -07:00
RCTReloadCommand.h Redo error handling on iOS 2017-10-05 13:31:55 -07:00
RCTReloadCommand.m Redo error handling on iOS 2017-10-05 13:31:55 -07:00
RCTRootContentView.h Immediately trigger renderApplication from RCTRootView init 2017-04-21 07:04:57 -07:00
RCTRootContentView.m Immediately trigger renderApplication from RCTRootView init 2017-04-21 07:04:57 -07:00
RCTRootView.h Clean up -[RCTRootView cancelTouches] header docs 2017-07-11 11:06:21 -07:00
RCTRootView.m Removed unused ivar (`_launchOptions`) from `RCTRootView` 2017-07-24 09:42:06 -07:00
RCTRootViewDelegate.h RCTRootView's `intrinsicSize` property was deprecated in favour of `intrinsicContentSize` 2017-02-27 14:04:58 -08:00
RCTRootViewInternal.h RCTRootView's `intrinsicSize` property was deprecated in favour of `intrinsicContentSize` 2017-02-27 14:04:58 -08:00
RCTTVRemoteHandler.h Apple TV support 4: support for input (tvOS focus engine) 2016-12-19 06:28:40 -08:00
RCTTVRemoteHandler.m Fix podspec test 2017-08-09 07:04:59 -07:00
RCTTouchEvent.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTTouchEvent.m New way to handle simultaneously active gesture recognizers in RCTTouchHandler 2017-01-12 12:13:28 -08:00
RCTTouchHandler.h Nobody outside RCTTouchHandler should treat it as UIGestureRecognizer subclass 2017-01-09 00:13:33 -08:00
RCTTouchHandler.m Do not warn if `touch.force` is NaN 2017-04-26 15:16:16 -07:00
RCTURLRequestDelegate.h Refactored networking logic out into RCTDownloadTask 2015-07-23 04:00:31 -08:00
RCTURLRequestHandler.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTUtils.h Improve definition of RCTNilIfNull 2017-08-09 03:35:16 -07:00
RCTUtils.m Fix build errors exposed by building against clang 5.0 2017-09-14 00:35:02 -07:00
RCTVersion.h Move JS-native version check to its own module + unit tests + prefix Obj-C macro w/RCT 2017-10-16 14:30:34 -07:00