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

123
Views
La función de clasificación no funciona en la matriz de objetos IE 10

Estoy tratando de ordenar la matriz de objetos por propiedad de "fecha". Esto funciona bien en Chrome, pero en IE no (ejemplo 1 de PSB).

He intentado ordenar la matriz de fechas simples y funciona bien (ejemplo 2), solo cuando la matriz está hecha de objetos, no lo hace.

¿Alguna idea de por qué?

ejemplo 1 - no funciona:

 let objectsArr = [ { dd: { name: 'l', address: 'dd' }, ww: { age: 15, city: 'BB' }, date: '12/03/2025' }, { dd: { name: 'l', address: 'dd' }, ww: { age: 15, city: 'BB' }, date: '12/05/2025' }, { dd: { name: 'l', address: 'dd' }, ww: { age: 15, city: 'BB' }, date: '12/03/2025' }, { dd: { name: 'l', address: 'dd' }, ww: { age: 15, city: 'BB' }, date: '12/03/2015' }, { dd: { name: 'l', address: 'dd' }, ww: { age: 15, city: 'BB' }, date: '10/03/2025' }, { dd: { name: 'l', address: 'dd' }, ww: { age: 15, city: 'BB' }, date: '12/03/2029' }, { dd: { name: 'l', address: 'dd' }, ww: { age: 15, city: 'BB' }, date: '12/03/2025' }, { dd: { name: 'l', address: 'dd' }, ww: { age: 15, city: 'BB' }, date: '12/03/2005' }, ]; objectsArr = objectsArr.sort(function (a, b) { return Date.parse(a.date) - Date.parse(b.date); });

ejemplo 2 - funciona bien:

 let datesArr = [ '12/03/2025', '12/03/2021', '12/03/2020', '12/03/2021', '12/03/2019', '12/03/2023', '12/03/2011', '12/03/2016', ]; datesArr = datesArr.sort(function (a, b) { return Date.parse(a) - Date.parse(b); });
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!