How to use the react-datepicker.default function in react-datepicker

To help you get started, we’ve selected a few react-datepicker examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alex3165 / react-typescript-starter / src / containers / main.tsx View on Github external
import ReactMapboxGl, { Popup } from 'react-mapbox-gl';
import { connect } from 'react-redux';
import { getLocations } from '../actions/index';
import { StateRoot } from '../reducers/index';
import { Stations } from './stations';
import styled from 'styled-components';
import { getDeepLink } from '../link';
import StationLabel from './station-label';
import Button from './button';
import * as moment from 'moment';
// tslint:disable-next-line:no-var-requires
import './style.css';
// tslint:disable-next-line:no-var-requires
// const data = require('../data/style.json');
// tslint:disable-next-line:no-var-requires
const DatePicker = require('react-datepicker').default;
// tslint:disable-next-line:no-submodule-imports
import 'react-datepicker/dist/react-datepicker.css';

const NavBar = styled.div`
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  min-height: 120px;
  justify-content: center;
  align-items: center;
`;

const Map = ReactMapboxGl({
  accessToken:
github PeterKottas / guestbell-forms / src / lib / components / openingHours / openingHoursSpecial / OpeningHoursSpecial.tsx View on Github external
import * as PlusIcon from 'material-design-icons/content/svg/production/ic_add_circle_outline_24px.svg';
import * as DateIcon from 'material-design-icons/action/svg/production/ic_event_24px.svg';

// Libs
import * as React from 'react';
try {
  var DatePicker = require('react-datepicker').default;
} catch {
  DatePicker = undefined;
}

// Misc
import OpeningHoursUtil from '../utils/OpeningHoursUtil';
import {
  OpeningHoursDayObj,
  OpeningHoursDay,
} from '../openingHoursDay/OpeningHoursDay';
import {
  BaseInputProps,
  BaseInputState,
  BaseInput,
} from '../../base/input/BaseInput';
import { Button } from '../../button/Button';

react-datepicker

A simple and reusable datepicker component for React

MIT
Latest version published 17 days ago

Package Health Score

100 / 100
Full package analysis