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

163
Views
no se puede obtener el valor de la hora y se envía cuando se hace clic en los botones de fecha y hora

Estoy tratando de hacer una reserva sin el botón Enviar. Tengo muchos botones para seleccionar una hora y un selector de fecha.

quiero que se envíen los datos cuando se haga clic en los botones de fecha y hora

no soy capaz de obtener el valor de tiempo también

 var doctorid = props const [dateState, setDateState] = useState(new Date()); const changeDate = (e) => { setDateState(e); }; function booking() { const data = { date: dateState, time: "12:pm",/// time button value must come here doctor: doctorid, };

este es el jsx

 <Calendar value={dateState} onChange={changeDate} /> <TabPanel> <button style={styles.button}>9:00am</button> <button style={styles.button}>9:30am</button> <button style={styles.button}>10:00am</button> <button style={styles.button}>10:30am</button> <button style={styles.button}>11:00am</button> <button style={styles.button}>11:30am</button> <button style={styles.button}>12:00pm</button> </TabPanel> <TabPanel> <button style={styles.button}>6:30pm</button> <button style={styles.button}>7:00pm</button> <button style={styles.button}>7:30pm</button> <button style={styles.button}>8:00pm</button> </TabPanel>

no soy capaz de obtener el valor de tiempo también

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

0

setDateState(e) debe ser setDateState(e.target.value);

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!