-
Notifications
You must be signed in to change notification settings - Fork 831
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move keyboard managing functionality out from separate hook and component * Remove outdated imports * Deal with typescript generics * Fix build errros * Improve type inferences * Split components by mode * Split to Mobile, Desktop, Static and Responsive components by wrapper variant * Fix docs not working with new components * Adopt date-io v2 * Fix autosubmit logic for desktop variant * Update TimePicker and DateTimepicker documentation examples * Update date-io version * Remove ts-ignores * Fix ts build errors * Fix console warns * Fix responsivenness for DateTimePicker * Fix some tests * Fix DateTimePicker tests * Regenerate lockfile * Fix refs ts errors * Fix wierd styles * Return @materail-ui/styles back for overrides.ts * Remove KeyboardDatePicker imports * Revert not needed package upgrades * Make ampm false by defautl * Rename wrappers * Updated docs for DatePicker * Update TimePicker and DateTimePicker docs * Add engines to package.json * Add engines to docs package.json * Fix prop types generation * Move inputValue state down from usePickerState hook * Enable working mobile keyboard input from dialog * Move mobile keyboard open state up to the pickerState and fix date validation in mobile keyboard view * Move prop-types to deps, add @types/react to dependencies * Remove useStaticState * Update cypress docker image * Fix incorrect executor reference * Updarte version of cireclci cypress orb * Fix tests * Fix displaying issues * Fix ts error
- Loading branch information
1 parent
689d7d3
commit 59a5d12
Showing
92 changed files
with
1,953 additions
and
2,872 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
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,28 @@ | ||
import React, { Fragment, useState } from 'react'; | ||
import EventNoteIcon from '@material-ui/icons/EventNote'; | ||
import { DesktopDatePicker } from '@material-ui/pickers'; | ||
|
||
function AdvancedKeyboardExample(props) { | ||
const [selectedDate, handleDateChange] = useState(new Date()); | ||
|
||
return ( | ||
<Fragment> | ||
<DesktopDatePicker | ||
autoOk | ||
variant="outlined" | ||
label="Advanced keyboard" | ||
placeholder="2018/01/01" | ||
format={props.__willBeReplacedGetFormatString({ | ||
moment: 'YYYY/MM/DD', | ||
dateFns: 'yyyy/MM/dd', | ||
})} | ||
mask="____/__/__" | ||
keyboardIcon={<EventNoteIcon />} | ||
value={selectedDate} | ||
onChange={date => handleDateChange(date)} | ||
/> | ||
</Fragment> | ||
); | ||
} | ||
|
||
export default AdvancedKeyboardExample; |
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
42 changes: 21 additions & 21 deletions
42
...o/datepicker/InlineDatePicker.example.jsx → ...s/demo/datepicker/DatePickers.example.jsx
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 |
---|---|---|
@@ -1,42 +1,42 @@ | ||
import React, { Fragment, useState } from 'react'; | ||
import { DatePicker, KeyboardDatePicker } from '@material-ui/pickers'; | ||
import { MobileDatePicker, DesktopDatePicker, DatePicker } from '@material-ui/pickers'; | ||
|
||
function InlineDatePickerDemo(props) { | ||
function DatePickersVariants(props) { | ||
const [selectedDate, handleDateChange] = useState(new Date()); | ||
|
||
return ( | ||
<Fragment> | ||
<DatePicker | ||
variant="inline" | ||
label="Basic example" | ||
<MobileDatePicker | ||
clearable | ||
label="For mobile" | ||
value={selectedDate} | ||
placeholder="10/10/2018" | ||
onChange={date => handleDateChange(date)} | ||
format={props.__willBeReplacedGetFormatString({ | ||
moment: 'MM/DD/YYYY', | ||
dateFns: 'MM/dd/yyyy', | ||
})} | ||
/> | ||
|
||
<DatePicker | ||
disableToolbar | ||
variant="inline" | ||
label="Only calendar" | ||
helperText="No year selection" | ||
<DesktopDatePicker | ||
autoOk | ||
label="For desktop" | ||
minDate={new Date('2017-01-01')} | ||
value={selectedDate} | ||
onChange={date => handleDateChange(date)} | ||
/> | ||
|
||
<KeyboardDatePicker | ||
autoOk | ||
variant="inline" | ||
inputVariant="outlined" | ||
label="With keyboard" | ||
format={props.__willBeReplacedGetFormatString({ | ||
moment: 'MM/DD/YYYY', | ||
dateFns: 'MM/dd/yyyy', | ||
})} | ||
<DatePicker | ||
disableFuture | ||
showTodayButton | ||
label="Responsive" | ||
openTo="year" | ||
views={['year', 'month', 'date']} | ||
value={selectedDate} | ||
InputAdornmentProps={{ position: 'start' }} | ||
onChange={date => handleDateChange(date)} | ||
/> | ||
</Fragment> | ||
); | ||
} | ||
|
||
export default InlineDatePickerDemo; | ||
export default DatePickersVariants; |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.
59a5d12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to following URLs: