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

377
Views
Jquery Datatables Moment error invalid date error

I get the following error in my console log. What am I doing wrong?

   p {_isAMomentObject: true, _i: '', _f: 'DD-MM-YYYY HH:mm:ss', _isUTC: false, _pf: {…}, …}
_d: Invalid Date {}
_f: "DD-MM-YYYY HH:mm:ss"
_i: ""
_isAMomentObject: true
_isUTC: false
_isValid: false
_locale: P

data.planning_deadline has the following format of date values stored 21-10-2021

Below code:

rowCallback: function ( row, data ) {
                var daysleft = moment(data.planning_deadline, 'DD-MM-YYYY HH:mm:ss');
                console.log(daysleft);
                var now = moment(); 
                
                 if ( daysleft.diff(now, 'days') <= 0 && data.planning_deadline != "" && data.planning_afgehandeld == 0 ){
                 $('td:eq(0)', row).css('background-color', ' rgba(255, 0, 0, 0.2)');
                 }
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!