Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
options = _props.options,
label = _props.label,
source = _props.source,
resource = _props.resource,
isRequired = _props.isRequired,
className = _props.className;
return _react2.default.createElement(
'div',
{ className: 'picker' },
_react2.default.createElement(
_MuiPickersUtilsProvider2.default,
{ utils: _dateFnsUtils2.default },
_react2.default.createElement(_materialUiPickers.TimePicker, _extends({}, options, {
label: _react2.default.createElement(_raCore.FieldTitle, {
label: label,
source: source,
resource: resource,
isRequired: isRequired
}),
margin: 'normal',
ref: function ref(node) {
_this2.picker = node;
},
className: className,
value: input.value ? input.value : null,
onChange: function onChange(date) {
return _this2.onChange(date);
}
}))
)
return _react2.default.createElement(
'div',
{ className: 'picker' },
_react2.default.createElement(
_materialUiPickers.MuiPickersUtilsProvider,
{ utils: _dateFns2.default },
_react2.default.createElement(_materialUiPickers.DateTimePicker, _extends({
className: className,
error: !!(touched && error),
ampm: false,
helperText: touched && error,
value: datify(input.value),
onChange: this.onChange,
label: _react2.default.createElement(_raCore.FieldTitle, {
label: label,
source: source,
resource: resource,
isRequired: isRequired
}),
clearable: true
}, options))
)
);
}
}]);
isRequired = _props.isRequired,
className = _props.className,
meta = _props.meta,
providerOptions = _props.providerOptions;
var touched = meta.touched,
error = meta.error;
return _react2.default.createElement(
'div',
{ className: 'picker' },
_react2.default.createElement(
_materialUiPickers.MuiPickersUtilsProvider,
providerOptions,
_react2.default.createElement(PickerComponent, _extends({}, options, {
label: _react2.default.createElement(_raCore.FieldTitle, {
label: label,
source: source,
resource: resource,
isRequired: isRequired
}),
margin: 'normal',
error: !!(touched && error),
helperText: touched && error,
ref: function ref(node) {
_this2.picker = node;
},
className: className,
value: input.value ? input.value : null,
onChange: this.onChange
}))
)
options = _props.options,
label = _props.label,
source = _props.source,
resource = _props.resource,
isRequired = _props.isRequired,
className = _props.className;
return _react2.default.createElement(
'div',
{ className: 'picker' },
_react2.default.createElement(
_MuiPickersUtilsProvider2.default,
{ utils: _dateFnsUtils2.default },
_react2.default.createElement(_materialUiPickers.DateTimePicker, _extends({}, options, {
label: _react2.default.createElement(_raCore.FieldTitle, {
label: label,
source: source,
resource: resource,
isRequired: isRequired
}),
margin: 'normal',
ref: function ref(node) {
_this2.picker = node;
},
className: className,
value: input.value ? input.value : null,
onChange: function onChange(date) {
return _this2.onChange(date);
}
}))
)
options = _props.options,
label = _props.label,
source = _props.source,
resource = _props.resource,
isRequired = _props.isRequired,
className = _props.className;
return _react2.default.createElement(
'div',
{ className: 'picker' },
_react2.default.createElement(
_MuiPickersUtilsProvider2.default,
{ utils: _dateFnsUtils2.default },
_react2.default.createElement(_materialUiPickers.DatePicker, _extends({}, options, {
label: _react2.default.createElement(_raCore.FieldTitle, {
label: label,
source: source,
resource: resource,
isRequired: isRequired
}),
margin: 'normal',
ref: function ref(node) {
_this2.picker = node;
},
className: className,
value: input.value ? input.value : null,
onChange: function onChange(date) {
return _this2.onChange(date);
}
}))
)