We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TypeError: undefined is not an object (evaluating 'this.props.day.toString') My Commponent
import React from 'react';
import { Dimensions,Text, View } from 'react-native'; import PersianCalendarPicker from 'react-native-jalali-date-picker';
export default class FreeTime extends React.Component { 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()), }; this.onDateChange = this.onDateChange.bind(this); } onDateChange(date) { this.setState({ date }); } render() { const { date, prevDay, prevDays } = this.state; return ( <View style={styles.container}> <PersianCalendarPicker selectedDate={date} onDateChange={this.onDateChange} screenWidth={Dimensions.get('window').width} minDate={prevDay} prevDays={prevDays} /> <Text style={styles.selectedDate}> Date: { this.state.date.toString() } </Text> </View> ); } }
The text was updated successfully, but these errors were encountered:
Thank you for report this issue. I will fix all the issues soon.
Sorry, something went wrong.
hi @BlackHair did you can fix this issue?
Hi
Main in package.json set Day.js, you can use it directly.
import PersianCalendarPicker from 'react-native-jalali-date-picker/PersianCalendarPicker';
Or use my version:
https://github.com/mgolkardev/react-native-jalali-date-picker-rtl
No branches or pull requests
TypeError: undefined is not an object (evaluating 'this.props.day.toString')
My Commponent
import React from 'react';
import { Dimensions,Text, View } from 'react-native';
import PersianCalendarPicker from 'react-native-jalali-date-picker';
export default class FreeTime extends React.Component {
constructor(props) {
super(props);
The text was updated successfully, but these errors were encountered: