Skip to content
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

horizontal CalendarList problem with modal #27

Open
c0dewriter opened this issue Jun 11, 2019 · 0 comments
Open

horizontal CalendarList problem with modal #27

c0dewriter opened this issue Jun 11, 2019 · 0 comments

Comments

@c0dewriter
Copy link

c0dewriter commented Jun 11, 2019

The vertical version works just fine inside my <Modal> without any weird behavior.
But when i set horizontal={true}, at first the Calendar gets rendered for a brief moment and i can see it but then it suddenly disappears.

Here's my code:

import React, { Component } from 'react';
import { Modal, View, ... } from 'react-native';
import { Container, Button, ... } from 'native-base';

class Archive extends Component<Props> {
  ...
  render() {
    return (
      <Container>
         <View>
           <Modal
              animationType="fade"
              transparent={true}
              visible={this.state.modalToDateVisible}
              onRequestClose={() => {
              this.setState({modalToDateVisible:false})
            }}>
            <View style={{alignItems:'center', justifyContent:'center', flex: 1, flexDirection: 'column', backgroundColor:'rgba(0, 0, 0, 0.5)'}}>
              <View style={{width:'95%', backgroundColor:'#F6F7F9', padding: 20 }}>
                <CalendarList
                  horizontal={true}
                  pagingEnabled={true}
                  type='jalaali'
                />
                <View style={{marginTop:20}}>
                  <Button onPress={()=>this.closeToDateModal()}
                    <Text style={{fontSize:20}}>Close</Text>
                  </Button>
                </View>
              </View>
            </View>
         ...
     );
   }
}

i tried :

  • changing its parent from <View> to horizontal <ScrollView>
  • all permutation of styling (absolute fill parent, zIndex and other stuff)

BTW: it works outside my Modal and the normal <Calendar> works too.

Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant