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

673
Views
Format date to correct date format in React

I am currently working with a React Kendo Grid which is filled with data by an API. On of the columns is Date and the data filling it comes in a format like:

2022-02-11T15:50:51.000+00:00   

I tried to format the Kendo Grid column like this:

 <GridColumn
                field="snDate"
                filter="date"
                format="{0:yyyy-MM-dd'T'HH:mm:ss.SSS'Z'}"
                width="200px"
                title="Date" 
              />

but when I filter it with Kendo datapicker filter, it returns no rows. What am I doing wrong?

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

0

You need to make a custom column compoenet and play with the date over there:

const DateCell = ({ myDate }) => { 
  const [year, month, day] = myDate.split('T')[0].split('-');
  const time_part = myDate.split('T')[1];

  return (
        <td>
            {`${year}/${month}/${day} ${time_part}`}
        </td>
    )
}
//export default DateCell //this is if you want to put it in separate component



<GridColumn
   field="snDate"
   filter="date"
   width="200px"
   title="Date" 
   cell={DateCell}
/>

My result is -> 2022/06/19 10:35:13.197

And when you filter it React Kendo Grid knows that the value of each cell is in the first format that you mentioned, I mean to the 2022-02-11T15:50:51.000+00:00 and the filter will work. It's worked for me. Good luck

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!