Skip to content

Commit

Permalink
allow project verlenging without end date
Browse files Browse the repository at this point in the history
  • Loading branch information
Laoujin committed Dec 27, 2024
1 parent ca65737 commit a9dab8e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions frontend/src/components/controls/other/ProjectValidator.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import {Moment} from "moment";

export const isDateIntervalValid = (startDate: Moment, endDate: Moment | undefined):boolean => {
return startDate.diff(endDate) < 0;
export const isDateIntervalValid = (startDate: Moment, endDate: Moment | undefined): boolean => {
if (!endDate) {
return true;
}
return startDate.diff(endDate) < 0;
};

export const isProjectValid = (startDate: Moment, endDate: Moment | undefined, previousProjectEndDate: Moment):boolean =>{
Expand Down

0 comments on commit a9dab8e

Please sign in to comment.