title: Sortable react material UI table with specific to date column
body: <p>I have a react material UI table that displays some data. I want to be able to sort the table according to latest date records to the first , Is there a way to do so by default? </p>
  
  <pre><code>&lt;TableHead style={{ backgroundColor: "lightgrey" }}&gt;
                &lt;TableRow&gt;
                  &lt;TableCell&gt;Location&lt;/TableCell&gt;
                  &lt;TableCell align="right"&gt;Slot-Time &lt;/TableCell&gt;
  
                  &lt;TableCell align="right" &gt;&lt;TableSortLabel onClick={() =&gt; handleSort('fromDate')}&gt;From Date&lt;/TableSortLabel&gt;&lt;/TableCell&gt;
  
                  &lt;TableCell align="right"&gt;From Time&lt;/TableCell&gt;
                  &lt;TableCell align="right"&gt;To Date&lt;/TableCell&gt; 
                  &lt;TableCell align="right"&gt;To Time&lt;/TableCell&gt;
                  &lt;TableCell align="right"&gt;Days in Week&lt;/TableCell&gt;
                  &lt;TableCell&gt; &lt;/TableCell&gt;
                &lt;/TableRow&gt;
              &lt;/TableHead&gt;
              &lt;TableBody&gt;
                {resultTable &amp;&amp;
                  resultTable.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).sort(order === 'asc'? ascCompare: desCompare ).map((n) =&gt; {
                    return (
                      &lt;TableRow key={n.id}&gt;
                        &lt;TableCell&gt;
                         { facilitiesList ? getFacilityName(n.facilityId) : ""} 
                        &lt;/TableCell&gt;
                        &lt;TableCell align="right"&gt;{n.slotTime}&lt;/TableCell&gt;
                        &lt;TableCell align="right"&gt;{Moment(n.fromDate, "DD-MM-YYYY").format("MMMM Do YYYY")} &lt;/TableCell&gt;
                        &lt;TableCell align="right"&gt;{n.fromTime}&lt;/TableCell&gt;
                        &lt;TableCell align="right"&gt;{Moment(n.toDate, "DD-MM-YYYY").format("MMMM Do YYYY")}&lt;/TableCell&gt;
                        &lt;TableCell align="right"&gt;{n.toTime}&lt;/TableCell&gt;
                        &lt;TableCell align="right"&gt;
                          {n.daysOfWeek
                            .split(",")
                            .map((day) =&gt; {
                              return days[parseInt(day) - 1];
                            })
                            .join()}
                        &lt;/TableCell&gt;`
  </code></pre>