Skip to content

Commit

Permalink
[docs] Fix DateFnsAdapter import docs typo (mui#1699)
Browse files Browse the repository at this point in the history
* Fix DateFnsAdapter import

The Adapter comes from  "@material-ui/pickers/adapter/date-fns";  instead of '@material-ui-pickers/adapter/date-fns';

* " fix
  • Loading branch information
Domino987 authored Apr 22, 2020
1 parent 3a1f342 commit b504c41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/pages/getting-started/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ import { CODESANDBOX_EXAMPLE_ID } from '_constants';

```jsx
import React, { useState } from 'react';
import DateFnsUtils from '@material-ui-pickers/adapter/date-fns'; // choose your lib
import DateFnsAdapter from '@material-ui/pickers/adapter/date-fns'; // choose your lib
import { DatePicker, TimePicker, DateTimePicker, LocalizationProvider } from '@material-ui/pickers';

function App() {
const [selectedDate, handleDateChange] = useState(new Date());

return (
<LocalizationProvider dateAdapter={DateFnsUtils}>
<LocalizationProvider dateAdapter={DateFnsAdapter}>
<DatePicker value={selectedDate} onChange={date => handleDateChange(date)} />
<TimePicker value={selectedDate} onChange={date => handleDateChange(date)} />
<DateTimePicker value={selectedDate} onChange={date => handleDateChange(date)} />
Expand Down

0 comments on commit b504c41

Please sign in to comment.