Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@iofjuupasli/react-google-flight-datepicker

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iofjuupasli/react-google-flight-datepicker

An ReactJS implementation for Google Flight date-picker by JSLancer team

  • 0.3.0
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

react-google-flight-datepicker

dependency status dev dependency status License: MIT Downloads

Google flight date picker implemented in ReactJS

Demo

  • Live demo: https://codesandbox.io/s/react-google-flight-datepicker-zultp
  • To run demo on your computer:
    • Clone this repository
    • yarn install
    • yarn run dev

Screenshot


Usage

RangeDatePicker
import { RangeDatePicker } from 'react-google-flight-datepicker`;
import 'react-google-flight-datepicker/dist/main.css';

<RangeDatePicker
  startDate={new Date()}
  endDate={new Date()}
  onChange={(startDate, endDate) => onDateChange(startDate, endDate)}
  minDate={new Date(1900, 0, 1)}
  maxDate={new Date(2100, 0, 1)}
  dateFormat="D"
  monthFormat="MMM YYYY"
  startDatePlaceholder="Start Date"
  endDatePlaceholder="End Date"
  disabled={false}
  className="my-own-class-name"
  startWeekDay="monday"
/>
SingleDatePicker
import { SingleDatePicker } from 'react-google-flight-datepicker`;
import 'react-google-flight-datepicker/dist/main.css';

<SingleDatePicker
  startDate={new Date()}
  onChange={(startDate) => onDateChange(startDate)}
  minDate={new Date(1900, 0, 1)}
  maxDate={new Date(2100, 0, 1)}
  dateFormat="D"
  monthFormat="MMM YYYY"
  startDatePlaceholder="Date"
  disabled={false}
  className="my-own-class-name"
  startWeekDay="monday"
/>
Props
Prop nameProp typeDefault valueDescription
startDateDatenullSelected start date
endDateDatenullSelected end date
dateFormatStringDDisplay format for date. Check momentjs doc for information (https://momentjs.com/docs/#/displaying/)
monthFormatStringMMM YYYYDisplay format for month. Check momentjs doc for information (https://momentjs.com/docs/#/displaying/)
onChangeFunctionnullEvent handler that is called when startDate and endDate are changed
onFocusFunctionnullReturn a string (START_DATE, END_DATE) which indicate which text input is focused
minDateDate1900 Jan 01Minimum date that user can select
maxDateDate2100 Jan 01Maximum date that user can select
classNameStringCustom CSS className for datepicker
disabledStringfalseDisable the datepicker
startDatePlaceholderStringStart DatePlaceholder text for startDate text input
endDatePlaceholderStringEnd DatePlaceholder text for endDate text input
startWeekDayString (monday or sunday)mondayDetermine the start day for a week (monday or sunday)
highlightTodayBoolfalseHightlight "today" date

Author

License

MIT

FAQs

Package last updated on 14 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc