mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-29 13:06:03 +10:00
Use BirthdayInputField component in form
This commit is contained in:
parent
9250dd6efd
commit
ce357d82e2
3 changed files with 12 additions and 5 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import AddImages from './AddImages/AddImages';
|
||||
import AuthorInfo from './AuthorInfo/AuthorInfo';
|
||||
import Avatar from './Avatar/Avatar';
|
||||
import BirthdayInput from './BirthdayInput/BirthdayInput';
|
||||
import BirthdayInput, { BirthdayInputField } from './BirthdayInput/BirthdayInput';
|
||||
import BookingInfo from './BookingInfo/BookingInfo';
|
||||
import Button, { InlineTextButton } from './Button/Button';
|
||||
import CloseIcon from './CloseIcon/CloseIcon';
|
||||
|
|
@ -52,6 +52,7 @@ export {
|
|||
AuthorInfo,
|
||||
Avatar,
|
||||
BirthdayInput,
|
||||
BirthdayInputField,
|
||||
BookingInfo,
|
||||
Button,
|
||||
CloseIcon,
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
}
|
||||
|
||||
.field {
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.countries {
|
||||
border: 1px solid #979797;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import {
|
|||
Button,
|
||||
StripeBankAccountToken,
|
||||
Select,
|
||||
BirthdayInput,
|
||||
BirthdayInputField,
|
||||
InputFieldOld,
|
||||
} from '../../components';
|
||||
import * as validators from '../../util/validators';
|
||||
|
|
@ -53,6 +53,7 @@ class PayoutDetailsFormComponent extends Component {
|
|||
className,
|
||||
country,
|
||||
currency,
|
||||
form,
|
||||
disabled,
|
||||
handleSubmit,
|
||||
pristine,
|
||||
|
|
@ -74,6 +75,7 @@ class PayoutDetailsFormComponent extends Component {
|
|||
})
|
||||
);
|
||||
|
||||
const birthdayId = `${form}.birthday`;
|
||||
const birthdayLabel = intl.formatMessage({ id: 'PayoutDetailsForm.birthdayLabel' });
|
||||
const birthdayRequired = validators.required(
|
||||
intl.formatMessage({
|
||||
|
|
@ -198,13 +200,13 @@ class PayoutDetailsFormComponent extends Component {
|
|||
component={InputFieldOld}
|
||||
validate={lastNameRequired}
|
||||
/>
|
||||
<Field
|
||||
<BirthdayInputField
|
||||
className={css.field}
|
||||
id={birthdayId}
|
||||
name="birthDate"
|
||||
label={birthdayLabel}
|
||||
format={null}
|
||||
type="custom"
|
||||
inputComponent={BirthdayInput}
|
||||
component={InputFieldOld}
|
||||
validate={birthdayRequired}
|
||||
/>
|
||||
<h2 className={css.subTitle}>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue