React-native-jalali-date-picker
React-native-jalali-date-picker copied to clipboard
props.day & cant find variable "numbers" problems
first issue is solved with passing day={new Date()} as props. but i dont have any idea about second.
constructor(props){
super(props);
this.state = {
date: new Date(),
prevDay: (d => new Date(d.setDate(d.getDate() - 1)))(new Date()),
prevDays: (d => new Date(d.setDate(d.getDate() - 1)).toJSON().split('T')[0].replace(/-/g, ''))(new Date()),
};
}
render() {
return (
<PersianCalendarPicker
selectedDate={this.state.date}
onDateChange={() => {this.setState({ date })}}
minDate={prevDay}
prevDays={prevDays}
day={new Date()}
/>
);
}