search datePickerSample from external service

0 Answers 36 Views
DatePicker
ixen
Top achievements
Rank 1
Iron
Iron
Iron
ixen asked on 30 Sep 2021, 03:15 PM

Hi

 

I have an complex object with many fields and many date Field coming from an service

Example

export class VueSommaireModel {
  profilId: number;
  name: string;
  surname: string;
  dateDeNaissance: Date;
  //more 50 fields
  ....
   }

My service failed

   this.service.getData(this.id)
        .subscribe(x => this.form.patchValue(x));

 

My form


  this.form = this.formBuilder.group({
      profilId: [''],
      name: [''],
      surname: [''],
      dateDeNaissance: new Date(),
  ...
  ...
data

"profilId": 50531,
    "surname": "3454",
    "name": "11",
    "date": "2027-12-30"
...
...
...
...
...  ...

 

  Where is my mistake ?

Do you have complete sample with datepicker, ReactiveForm and Service

 

Regards

 

 

No answers yet. Maybe you can help?

Tags
DatePicker
Asked by
ixen
Top achievements
Rank 1
Iron
Iron
Iron
Share this question
or