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

146
Views
¿Hay alguna manera de seleccionar elementos de una matriz en función del tiempo transcurrido?

Estoy construyendo un calendario de días. Tiene 8 casillas cada una representando una hora. Me gustaría que las casillas en el pasado se atenuaran usando el momento. Lo que estoy pensando hasta ahora es esto aquí:

 var greyedOut = ["nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen" ] var selected = []; greyedOut.forEach(function(check) { selected.push(check) }) console.log(selected); if (moment().isAfter(moment(check))) { $() }; var check = moment.duration(8, 'hours').asMinutes(); console.log(check); let divvy = [480 / 8, 60 / 8]; console.log(divvy);

gracias por cualquier aporte o consejo

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

0

Su pregunta no es muy clara, pero tal vez esto se acerque a lo que desea.

 greyedOut.forEach(function(check) { if (moment().isAfter(moment(check))) { $("#" + check).css("background-color", "grey"); } else { selected.push(check); } }); console.log(selected);

La prueba de moment(check) debe estar dentro del bucle.

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!