WIP report. Added stats, sagas for calculation, formatting.
This commit is contained in:
@@ -29,7 +29,7 @@ export default function CloseDateDisplayMolecule({ jobId, close_date }) {
|
||||
return (
|
||||
<div onBlur={() => setEditMode(false)}>
|
||||
<DatePicker
|
||||
value={value.isValid() ? value : null}
|
||||
value={value && value.isValid() ? value : null}
|
||||
onChange={handleChange}
|
||||
/>
|
||||
{loading && <Spin size="small" />}
|
||||
@@ -38,7 +38,7 @@ export default function CloseDateDisplayMolecule({ jobId, close_date }) {
|
||||
|
||||
return (
|
||||
<div style={{ cursor: "pointer" }} onClick={() => setEditMode(true)}>
|
||||
{value.isValid() ? value.format("MM/DD/yyyy") : "No date set"}
|
||||
{value && value.isValid() ? value.format("MM/DD/yyyy") : "No date set"}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user