Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

177
Views
¿Cómo poner la respuesta de matriz en el cuadro de entrada?

Hola, necesitaba ayuda para colocar una matriz en la pantalla de valor del cuadro de entrada a continuación

Así es como es mi respuesta de matriz

 [{"CollectionFirstDate": "2021-12-15", "StartDay": 1, "EndDay": 6}]

Me gustaría que esta matriz se coloque en mi cuadro de entrada

 2021-12-15 = DateoffirstcollectionDisplay StartDay": 1, "EndDay": 6 = dayrange

Cómo puedo hacer eso ?

 <div class="mb-3 StyleFormRestRight dateoffirstcollection"> <label for="CollectionType" class="col-3 form-label"><b class="Dateoffirstcollection">Date of first collection</b></label> <br/> <input type="text" class="col-2 form-control" id="DateoffirstcollectionDisplay" disabled readonly> </div> <div class="mb-3 StyleFormRestRight daysrange"> <label for="CollectionType" class="col-3 form-label"><b class="dayrange">Day range</b></label> <br/> <input type="text" class="col-2 form-control" id="dayrange" disabled readonly> </div>

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

No mencionaste ningún error que tengas. Puedes probar este código:

 const responses = [ { CollectionFirstDate: '2021-12-15', StartDay: 1, EndDay: 6 }, ]; document.addEventListener('DOMContentLoaded', () => { responses.forEach((response) => { document.getElementById('DateoffirstcollectionDisplay').value = response.CollectionFirstDate; document.getElementById( 'dayrange' ).value = `${response.StartDay} - ${response.EndDay}`; }); });
 <div class="mb-3 StyleFormRestRight dateoffirstcollection"> <label for="CollectionType" class="col-3 form-label" ><b class="Dateoffirstcollection">Date of first collection</b></label > <br /> <input type="text" class="col-2 form-control" id="DateoffirstcollectionDisplay" disabled readonly /> </div> <div class="mb-3 StyleFormRestRight daysrange"> <label for="CollectionType" class="col-3 form-label" ><b class="dayrange">Day range</b></label > <br /> <input type="text" class="col-2 form-control" id="dayrange" disabled readonly /> </div>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!