Skip to content

Commit

Permalink
Fix date sorting (spo-iitk#250)
Browse files Browse the repository at this point in the history
* fix date sorting :))

* fix lint
  • Loading branch information
1-harshr authored Nov 14, 2023
1 parent cd7dd30 commit 02402c1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
9 changes: 4 additions & 5 deletions pages/student/rc/[rcid]/applications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,14 @@ const columns: GridColDef[] = [
{
field: "deadline",
headerName: "Application Deadline",
valueGetter: ({ value }) =>
value && `${new Date(value).toLocaleString("en-GB")}`,
width: 200,
renderCell: ({ value }) => `${new Date(value).toLocaleString("en-GB")}`,
type: "dateTime",
},
{
field: "applied_on",
headerName: "Applied On",
valueGetter: ({ value }) =>
value && `${new Date(value).toLocaleString("en-GB")}`,
renderCell: ({ value }) => `${new Date(value).toLocaleString("en-GB")}`,
type: "dateTime",
},
{
field: "resume",
Expand Down
5 changes: 2 additions & 3 deletions pages/student/rc/[rcid]/opening/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ function Openings() {
{
field: "deadline",
headerName: "Application Deadline",
renderCell(params) {
return new Date(params.value).toLocaleString();
},
renderCell: ({ value }) => `${new Date(value).toLocaleString("en-GB")}`,
type: "dateTime",
},
{
field: "proforma",
Expand Down
5 changes: 2 additions & 3 deletions pages/student/rc/[rcid]/proforma/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ function Proforma() {
{
field: "deadline",
headerName: "Application Deadline",
renderCell(params) {
return new Date(params.value).toLocaleString();
},
renderCell: ({ value }) => `${new Date(value).toLocaleString("en-GB")}`,
type: "dateTime",
},
{
field: "Actions",
Expand Down

0 comments on commit 02402c1

Please sign in to comment.