DefinitelyTyped/types/react-datepicker/react-datepicker-tests.tsx
Sean Kelley 0c1f57baf8 react-datepicker: replace any types with their actual types; simplify tests.
- Remove several references to `any` that were too permissive.
- Add an explicit dependency on popper.js.
- Simplify tests by removing extraneous wrapper component and just creating a
  component; add a few more fields (but definitely not exhaustive tests).
- Add myself as a maintainer.
- Sort lines, because they clearly used to be that way and had some things
  added to the end.
2018-06-28 14:11:47 -07:00

19 lines
351 B
TypeScript

import * as React from 'react';
import * as moment from 'moment';
import DatePicker from 'react-datepicker';
<DatePicker
selected={moment()}
onChange={(date: moment.Moment | null) => {}}
onYearChange={(date: moment.Moment) => {}}
popperModifiers={{
flip: {
enabled: false
}
}}
includeTimes={[moment()]}
>
<div/>
<span/>
</DatePicker>;