forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DatePicker] Fix not working onlyCalendar prop (mui#988)
* Remove typing for deprecated openToYearSelection * [mui#984] Fix not working onlyCalendar prop * Change onlyCalendar prop description
- Loading branch information
1 parent
a9e830a
commit 0cc4fed
Showing
8 changed files
with
99 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import * as React from 'react'; | ||
import DatePicker from '../../DatePicker/DatePicker'; | ||
import { mount, utilsToUse } from '../test-utils'; | ||
|
||
describe('DatePicker - different props', () => { | ||
it('Should not render toolbar if onlyCalendar = true', () => { | ||
const component = mount( | ||
<DatePicker | ||
open | ||
onlyCalendar | ||
onChange={jest.fn()} | ||
value={utilsToUse.date('2018-01-01T00:00:00.000Z')} | ||
/> | ||
); | ||
|
||
expect(component.find('WithStyles(PickerToolbar)').length).toBe(0); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters