Skip to content

Fix/Picker + TextField Ui fixes #785

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 27 additions & 12 deletions demo/src/screens/componentScreens/DateTimePickerScreen.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,42 @@
import React, {Component} from 'react';
import {DateTimePicker, View, Text} from 'react-native-ui-lib'; // eslint-disable-line


export default class DateTimePickerScreen extends Component {

render() {
return (
<View flex padding-20>
<Text text40 marginB-40>Date Time Picker</Text>

<DateTimePicker
title={'Date'}
placeholder={'Select a date'}
<View flex padding-s5>
<Text text40>Date Time Picker</Text>
<DateTimePicker
containerStyle={{marginVertical: 20}}
title={'Date'}
placeholder={'Select a date'}
// dateFormat={'MMM D, YYYY'}
// value={new Date('October 13, 2014')}
// value={new Date('October 13, 2014')}
/>
<DateTimePicker
mode={'time'}
title={'Time'}
<DateTimePicker
mode={'time'}
title={'Time'}
placeholder={'Select time'}
// timeFormat={'h:mm A'}
// value={new Date('2015-03-25T12:00:00-06:30')}
/>

<Text text60R marginT-40>
Disabled
</Text>
<DateTimePicker
containerStyle={{marginBottom: 20}}
editable={false}
title={'Date'}
placeholder={'Select a date'}
/>
<DateTimePicker
editable={false}
mode={'time'}
title={'Time'}
placeholder={'Select time'}
value={new Date('2015-03-25T12:00:00-06:30')}
/>
</View>
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/inputs/TextField.js
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ export default class TextField extends BaseInput {
};
}

function createStyles({centered, multiline, expandable}) {
function createStyles({centered, multiline, hideUnderline}) {
const inputTextAlign = Constants.isRTL ? 'right' : 'left';

return StyleSheet.create({
Expand Down Expand Up @@ -771,7 +771,7 @@ function createStyles({centered, multiline, expandable}) {
position: 'absolute',
right: 0,
alignSelf: 'flex-end',
paddingBottom: 8
paddingBottom: hideUnderline ? undefined : 8
},
rightButton: {
position: 'absolute',
Expand Down
2 changes: 0 additions & 2 deletions src/components/picker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import * as PickerPresenter from './PickerPresenter';
import NativePicker from './NativePicker';
import PickerModal from './PickerModal';
import PickerItem from './PickerItem';
import {Colors} from '../../style';

const PICKER_MODES = {
SINGLE: 'SINGLE',
Expand Down Expand Up @@ -349,7 +348,6 @@ class Picker extends BaseComponent {
const label = this.getLabel();
return (
<TextField
color={Colors.dark10}
{...textInputProps}
{...this.getAccessibilityInfo()}
importantForAccessibility={'no-hide-descendants'}
Expand Down