Skip to content

Commit 9b5db8b

Browse files
committed
fix: set a max width for BasicDateInput component
1 parent 1c27bb1 commit 9b5db8b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/inputs/BasicInputs/BasicDateInput/BasicDateInput.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,23 @@ import React from 'react';
55
import PropTypes from 'prop-types';
66
import 'date-fns';
77
import DateFnsUtils from '@date-io/date-fns';
8+
import { makeStyles } from '@material-ui/core';
89
import { MuiPickersUtilsProvider, KeyboardDatePicker } from '@material-ui/pickers';
910

11+
const useStyles = makeStyles((theme) => ({
12+
datePicker: {
13+
maxWidth: '200px',
14+
},
15+
}));
16+
1017
export const BasicDateInput = (props) => {
18+
const classes = useStyles();
1119
const { id, label, format, value, dateProps, changeSelectedDate, ...otherProps } = props;
1220

1321
return (
1422
<MuiPickersUtilsProvider utils={DateFnsUtils}>
1523
<KeyboardDatePicker
24+
className={classes.datePicker}
1625
disableToolbar
1726
variant="inline"
1827
margin="normal"

0 commit comments

Comments
 (0)