Skip to content

Instantly share code, notes, and snippets.

@ashinzekene
Created May 2, 2020 08:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashinzekene/7dfe21245d6bb93d37cdcaee03f932db to your computer and use it in GitHub Desktop.
Save ashinzekene/7dfe21245d6bb93d37cdcaee03f932db to your computer and use it in GitHub Desktop.
import React from "react";
import PropTypes from "prop-types";
import DatePicker from "react-datepicker";
import "./_custom-date-picker.scss";
export const CustomDatePicker = ({
showIcon, placeholderText, endDate, minDate, maxDate, dateFormat, selected, onChange, monthDropdown, yearDropdown
}) => (
<div className={showIcon ? "custom-date-picker custom-date-picker--show-icon" : "custom-date-picker"}>
<DatePicker
showMonthDropdown={monthDropdown}
showYearDropdown={yearDropdown}
placeholderText={placeholderText}
endDate={endDate}
dateFormat={dateFormat}
selected={selected}
minDate={minDate}
maxDate={maxDate}
onChange={onChange}
/>
</div>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment