},
});
-export const TextField = withStyles(styles)((props: WrappedFieldProps & WithStyles<CssRules> & { label?: string, autoFocus?: boolean, required?: boolean }) =>
+type TextFieldProps = WrappedFieldProps & WithStyles<CssRules>;
+
+export const TextField = withStyles(styles)((props: TextFieldProps & { label?: string, autoFocus?: boolean, required?: boolean }) =>
<MaterialTextField
helperText={props.meta.touched && props.meta.error}
className={props.classes.textField}
label?: string;
}
-type RichEditorTextFieldProps = RichEditorTextFieldData & WrappedFieldProps & WithStyles<CssRules>;
+type RichEditorTextFieldProps = RichEditorTextFieldData & TextFieldProps;
export const RichEditorTextField = withStyles(styles)(
class RichEditorTextField extends React.Component<RichEditorTextFieldProps> {
placeholder={this.props.label} />;
}
}
-);
\ No newline at end of file
+);
+
+export const DateTextField = withStyles(styles)
+ ((props: TextFieldProps) =>
+ <MaterialTextField
+ type="date"
+ disabled={props.meta.submitting}
+ helperText={props.meta.error}
+ error={!!props.meta.error}
+ fullWidth={true}
+ InputLabelProps={{
+ shrink: true
+ }}
+ name={props.input.name}
+ onChange={props.input.onChange}
+ value={props.input.value}
+ />
+ );
\ No newline at end of file