Skip to content

Commit f8654f3

Browse files
authored
Expiration date update (distributed-system-analysis#3597)
Fix date picker
1 parent c0946eb commit f8654f3

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

dashboard/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"react-app-rewired": "^2.2.1",
3131
"react-bootstrap": "^2.1.2",
3232
"react-chartjs-2": "^5.2.0",
33+
"react-datepicker": "^6.1.0",
3334
"react-dom": "^17.0.2",
3435
"react-redux": "^7.2.6",
3536
"react-router": "6.3.0",

dashboard/src/modules/components/OverviewComponent/NewRunsComponent.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ const NewRunsComponent = () => {
200200
saveRowData={saveRowData}
201201
rowActions={rowActions}
202202
item={item}
203-
onDateSelect={(_event, str) =>
203+
onDateSelect={(str) =>
204204
updateTblValue(
205205
str,
206206
SERVER_DELETION_KEY,

dashboard/src/modules/components/OverviewComponent/SavedRunsComponent.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ const SavedRunsComponent = () => {
204204
updateTblValue(val, NAME_KEY, item.resource_id)
205205
}
206206
toggleEdit={toggleEdit}
207-
onDateSelect={(_event, str) =>
207+
onDateSelect={(str) =>
208208
updateTblValue(
209209
str,
210210
SERVER_DELETION_KEY,

dashboard/src/modules/components/OverviewComponent/common-component.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import "./index.less";
2+
import "react-datepicker/dist/react-datepicker.css";
23

34
import * as CONSTANTS from "assets/constants/overviewConstants";
45

@@ -13,7 +14,6 @@ import {
1314
} from "@patternfly/react-table";
1415
import {
1516
Button,
16-
DatePicker,
1717
Dropdown,
1818
DropdownItem,
1919
DropdownToggle,
@@ -41,6 +41,7 @@ import {
4141
} from "actions/overviewActions";
4242
import { useDispatch, useSelector } from "react-redux";
4343

44+
import DatePicker from "react-datepicker";
4445
import MetadataTreeView from "./MetadataTreeComponent";
4546
import { formatDateTime } from "utils/dateFunctions";
4647
import { setRelayModalState } from "actions/relayActions";
@@ -401,7 +402,10 @@ export const SavedRunsRow = (props) => {
401402

402403
export const SelectDateComponent = (props) => (
403404
<div className="date-picker-container">
404-
<DatePicker value={props.value} onChange={props.onDateSelect} />
405+
<DatePicker
406+
selected={props.value}
407+
onChange={(date) => props.onDateSelect(date)}
408+
/>
405409
</div>
406410
);
407411

0 commit comments

Comments
 (0)