Skip to content

ram33z/react-horizontal-strip-datepicker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project was bootstrapped with Create React App.

Available Scripts

In the project directory, you can run:

react-horizontal-strip-datepicker

A stable horizontal date picker with the option to scroll for web Example

Installation

Run yarn add react-horizontal-strip-datepicker

Usage

Import:

import ReactHorizontalDatePicker from "react-horizontal-strip-datepicker";

and use as:

<ReactHorizontalDatePicker
  selectedDay={onSelectedDay}
  enableScroll={true}
  enableDays={80}
/>

Available Props are

Prop Type Default Description
enableScroll Boolean false Set List to be scrollable
selectedDay Function Function to get the selected Day
enableDays Number 90 Number of days to render from current date

enableDays has no effect if enableScroll is true.

Example:

import React from 'react'

import ReactHorizontalDatePicker from 'react-horizontal-strip-datepicker'
import 'react-horizontal-strip-datepicker/dist/ReactHorizontalDatePicker.css'

const App = () => {
  const onSelectedDay = (d) => {
    console.log(d)
  }

  return (
    <ReactHorizontalDatePicker
      selectedDay={onSelectedDay}
      enableScroll={true}
      enableDays={180}
    />
  )
}

export default App

About

Horizontal Datepicker (React Functional Component)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 62.1%
  • CSS 27.9%
  • HTML 10.0%