add native select field, data text field and search bar model
[arvados.git] / src / components / text-field / text-field.tsx
index 4d8c012f9edec158ada5549b9b3cfde0dde3b368..1bf51973d429cfe034e059f234f50feefaca2f41 100644 (file)
@@ -55,4 +55,22 @@ export const RichEditorTextField = withStyles(styles)(
                 placeholder={this.props.label} />;
         }
     }
-);
\ No newline at end of file
+);
+
+type DataTextFieldProps = WrappedFieldProps & WithStyles<CssRules>;
+
+export const DataTextField = withStyles(styles)
+    ((props: DataTextFieldProps) => 
+        <MaterialTextField
+            disabled={props.meta.submitting}
+            error={props.meta.touched && !!props.meta.error}
+            type="date"
+            fullWidth={true}
+            name={props.input.name}
+            InputLabelProps={{
+                shrink: true
+            }}
+            onChange={props.input.onChange}
+            value={props.input.value}
+        />    
+    );
\ No newline at end of file