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

261
Views
React JS Cómo cambiar el valor en @ material-ui keyboarddatepicker que ya está vinculado a un campo de modelo

En React JS tengo un menú desplegable y un selector de fechas de teclado @material-ui. Mi selector de fecha está vinculado a un campo en un archivo json ...

 <div> Expiry Date:<KeyboardDatePicker id="ExpiryDate" disablePast minDate={new Date()} format="D/MM/yyyy" mask="__/__/____" value={Person.LocationExpiryDate} /> </div>

Tenga en cuenta el valor límite anterior del modelo 'Persona'.

Tengo un control desplegable que en su evento onChange me gustaría cambiar el valor en el selector de fecha del teclado a 6 meses a partir de ahora...

 {this.DropdownControl(lookups.PracticeLocations, true, Person.CPPEPracticeLocation, event => this.HandleChangePerson(event, 'Location'))} </div> HandleChangePerson (event, propertyName) { if (propertyName == 'Location') { // Get date 6 months from today const todayDate = new Date().toISOString().slice(0, 10); const newExpiryDate = moment(todayDate).add(6, 'M').format('D/MM/YYYY') // TODO: code here to change the keyboarddatepicker value. }

Intenté usar state y js sin formato para cambiar el valor, pero debido a que ya está vinculado, no cambia el valor

Busqué 'enlace bidireccional' pero parece que no puedo encontrar nada que haga referencia al uso de un modelo.

about 4 years ago · Juan Pablo Isaza
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!