react-native icon indicating copy to clipboard operation
react-native copied to clipboard

DatePickerIOS is not displayed properly in 4in screens

Open thevishnupradeep opened this issue 10 years ago • 4 comments

simulator screen shot 19 jun 2016 09 55 11

The component works perfectly in iPhone 6 and 6 Plus.

I don't know if this is something from my side. Posting the component code here as well:

<View style={styles.Section}> <Text style={styles.FormTitle}>Deadline: {dateFormat(this.state.deadline, "ddd, mmm dS, h:MM TT")}</Text> <DatePickerIOS date={this.state.deadline} mode="datetime" onDateChange={(deadline) => { this.setState({ deadline }); }} /> </View>

thevishnupradeep avatar Jun 19 '16 06:06 thevishnupradeep

What's defined in {styles.Section}?

christopherdro avatar Jun 19 '16 15:06 christopherdro

Section: { backgroundColor: '#ffffff', borderRadius: 5, marginTop: 20, marginLeft: 5, marginRight: 5, padding: 10, shadowColor: "#DDDDDD", shadowOpacity: 1, shadowRadius: 2, shadowOffset: { height: 1, width: 0 } },

thevishnupradeep avatar Jun 19 '16 16:06 thevishnupradeep

Have you tried remove all margins and padding to test?

christopherdro avatar Jun 19 '16 18:06 christopherdro

Hi, Sorry for the late reply. Yes I've tried. Both from the component and the parent. That only partially solved the issue. It was still not properly in center.

thevishnupradeep avatar Jun 29 '16 18:06 thevishnupradeep