简体   繁体   中英

Dynamic reactive form controls

Requirement: There will be two calendar inputs. If user selects the range from May 2020 to May 21. I should create 3 set of 12 dynamic reactive form controls. It should also have required field validations. PS: Am quite new to this dynamic controls. And I see in some forums to use for formarray. Please help me with some headers. will go ahead with that. Thanks

You can use Angular FormBuilder with FormGroup to create your dynamic form. Inside the FormGroup you can create your 12 fields with different set of FormControl. In the FormControl object you can add the validators of your choice as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM