日历计算

  <RangePicker
                  onChange={(e: any) => {
                    console.log('formatString', e);
                    const duration = moment.duration(e[1].diff(e[0]));
                    const days = duration.asDays();
                    form.validateFields().then((res: any) => {
                      res.maeProductionPlanDTOList[index].machiningPlanDay = days;
                      console.log('res', res);
                      form.setFieldsValue(res);
                    });
                  }}
                  style={{ width: 220 }}
                />

  

posted @ 2024-05-30 16:10  zjxgdq  阅读(13)  评论(0编辑  收藏  举报