Skip to content

Commit

Permalink
fix(Form/Base): fix wrong formitem rules (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
AshinZ authored Aug 18, 2023
1 parent ac0032b commit 433aaf5
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions src/pages/Form/Base/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,35 @@ export default memo(() => {
</FormItem>
</Col>

<Col span={6} className={Style.dateCol} rules={[{ required: true }]}>
<FormItem label='合同签订日期' name='signDate' initialData={INITIAL_DATA.signDate}>
<Col span={6} className={Style.dateCol}>
<FormItem
label='合同签订日期'
name='signDate'
initialData={INITIAL_DATA.signDate}
rules={[{ required: true }]}
>
<DatePicker mode='date' />
</FormItem>
</Col>

<Col span={6} className={Style.dateCol} rules={[{ required: true }]}>
<FormItem label='合同生效日期' name='effectiveDate' initialData={INITIAL_DATA.effectiveDate}>
<Col span={6} className={Style.dateCol}>
<FormItem
label='合同生效日期'
name='effectiveDate'
initialData={INITIAL_DATA.effectiveDate}
rules={[{ required: true }]}
>
<DatePicker mode='date' />
</FormItem>
</Col>

<Col span={6} className={Style.dateCol} rules={[{ required: true }]}>
<FormItem label='合同结束日期' name='endDate' initialData={INITIAL_DATA.endDate}>
<Col span={6} className={Style.dateCol}>
<FormItem
label='合同结束日期'
name='endDate'
initialData={INITIAL_DATA.endDate}
rules={[{ required: true }]}
>
<DatePicker mode='date' />
</FormItem>
</Col>
Expand Down

0 comments on commit 433aaf5

Please sign in to comment.