Skip to content

shreyj786/react-native_horizontal_calender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Native_horizontal_calender

 

React Native Horizontal Calender

Github top language Github language count Repository size License

🎯 About

React native component which renders list of dates.

🎯 Demo


🎯 Installation

npm i react-native_horizontal_calender

🎯 Example

function App(): JSX.Element {
 
  const [receivedDate, setReceivedDate] = useState<Date>(currentDate);

  const handleDataFromCalender = (date:Date) => {
    console.log('date',date)
    setReceivedDate(date);
  };

  return (
    <View>
      <HorizontalCalender
        onPressed={handleDataFromCalender}
        populateDatesOnLastDateSelect={true}
        userSelectedDate={currentDate}
        startingDate={currentDate}
        numberOfDays={10}
      />
      <Text style={styles.sectionDescription}>{receivedDate.toISOString() }</Text>
    </View>
  );
}

🎯 Platform Support

Supports both Android and iOS.

🎯 Props

Prop Type Optional Default Description
userSelectedDate Date No n/a User current date or selected date
onPressed (date: Date) => void No n/a callback which provides selected date as an argument.
startingDate Date No n/a Starting point of the calender
numberOfDays number Yes 10 Number of days you want to populate
populateDatesOnLastDateSelect boolean Yes true Use this value if you want to populate dates further on last date select
horizontal boolean Yes true Show calender horizontal or not

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published