mirror of
https://github.com/vale981/Vulcan
synced 2025-03-04 17:21:37 -05:00
Add marginTop to MuiPicker
This commit is contained in:
parent
0e79512b06
commit
9b9459cf6d
1 changed files with 4 additions and 3 deletions
|
@ -14,6 +14,7 @@ const dateFormat = 'YYYY-MM-DD';
|
|||
|
||||
export const styles = theme => ({
|
||||
inputRoot: {
|
||||
'marginTop': '16px',
|
||||
'& .clear-enabled': { opacity: 0 },
|
||||
'&:hover .clear-enabled': { opacity: 0.54 },
|
||||
},
|
||||
|
@ -40,13 +41,13 @@ const MuiPicker = createReactClass({
|
|||
formatValue: PropTypes.func,
|
||||
hideClear: PropTypes.bool,
|
||||
},
|
||||
|
||||
|
||||
getDefaultProps: function () {
|
||||
return {
|
||||
type: 'date',
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
handleChange: function (event) {
|
||||
let value = event.target.value;
|
||||
if (this.props.scrubValue) {
|
||||
|
@ -54,7 +55,7 @@ const MuiPicker = createReactClass({
|
|||
}
|
||||
this.props.onChange(value);
|
||||
},
|
||||
|
||||
|
||||
render: function () {
|
||||
const { classes, disabled, autoFocus } = this.props;
|
||||
const value = moment(this.props.value, dateFormat, true).isValid() ? this.props.value : moment(this.props.value).format(dateFormat);
|
||||
|
|
Loading…
Add table
Reference in a new issue