-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create date range picker field
- Loading branch information
Showing
11 changed files
with
415 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
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
Binary file not shown.
Binary file not shown.
17 changes: 17 additions & 0 deletions
17
packages/react-material-ui/src/components/DateRangePicker/DateInput/Styles.ts
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,17 @@ | ||
import { styled } from '@mui/material/styles'; | ||
|
||
export const CustomInput = styled('input')(({}) => ({ | ||
border: 'none', | ||
textAlign: 'center', | ||
textTransform: 'uppercase', | ||
outline: 'none', | ||
fontFamily: 'inherit', | ||
fontSize: '1rem', | ||
width: '112px', | ||
'&::-webkit-calendar-picker-indicator': { | ||
display: 'none', | ||
}, | ||
'&::-moz-calendar-picker-indicator': { | ||
display: 'none', | ||
}, | ||
})); |
10 changes: 10 additions & 0 deletions
10
packages/react-material-ui/src/components/DateRangePicker/DateInput/index.tsx
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,10 @@ | ||
import React, { InputHTMLAttributes, forwardRef } from 'react'; | ||
import { CustomInput } from './Styles'; | ||
|
||
type Props = InputHTMLAttributes<HTMLInputElement>; | ||
|
||
const DateInput = forwardRef((props: Props, ref: any) => { | ||
return <CustomInput ref={ref} type="date" {...props} />; | ||
}); | ||
|
||
export default DateInput; |
Oops, something went wrong.