import React, {Component} from 'react';
import {DatePickerIOS, View, StyleSheet} from 'react-native';
import Module from '../lib/Module';
import Types from '../lib/Types';


export default class DatePicker extends Module{
	constructor(props){
		super(props)
		this.state = { chosenDate : new Date()}
	}
	setDate(newDate) {
    		this.setState({chosenDate: newDate});
  		}

	display(){
		let { container } = this.props.style || '';
		return(
		<View style={container}>
        	<DatePickerIOS
          		date={this.state.chosenDate}
          		onDateChange={(date) => this.setDate(date)}
        />
        </View>
        )
	}
}



DatePicker.Inputs = {

}

