Yann Pringault
1c24440644
Add TimePicker modes
...
Summary:
In the spirit of #10932 , I added the `mode` option to the `TimePicker` Android API.
There is only one mode available for **Android < 5**, the `spinner` one.
If we are on **Android >= 5** we can choose between `spinner` or `clock`. If we specify `default` it will use the default of the current Android version.
On **Android < 5**, whatever we choose it will be this:

On **Android >= 5**, with the `spinner` mode:

And with the `clock` mode, the default:

Closes https://github.com/facebook/react-native/pull/12384
Differential Revision: D6006689
Pulled By: hramos
fbshipit-source-id: fcd37c867c4061b9982b1687f2c10211e54df7cf
2017-10-08 12:38:45 -07:00
Pandiarajan Nagarajan
eaccd7e82e
Android datepicker mode configurations added
...
Summary:
Currently, The **DatePickerAndroid** component opens the native date picker with default mode. We can't able to change the mode via configurations. To support android **[date-picker mode](https://developer.android.com/reference/android/widget/DatePicker.html )**, existing component needs to be changed.
**For Android >= 5.0**, The DatePickerDialog doesn't provide the default method to change the mode of a date picker. So I have added custom theme which will support two kinds of **mode('spinner','calendar')** ref:https://developer.android.com/reference/android/R.attr.html#datePickerStyle .
**For Android < 5.0,** The DatePickerDialog provides the default method to change the mode of a date picker. ref:https://developer.android.com/reference/android/widget/DatePicker.html#setCalendarViewShown(boolean) .
With the help of **Build.VERSION.SDK_INT** I have done the above functionality with limited lines of code changes and also I have added the example to UIExplorer.
Closes https://github.com/facebook/react-native/pull/10932
Differential Revision: D4176089
Pulled By: ericvicenti
fbshipit-source-id: 7dfa9101214501ac2124bda7ee273a538f04e7cf
2016-11-23 04:58:31 -08:00