Skip to content

Commit

Permalink
🚚 Enabled the professors to create an event the same day
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrl-plus-w authored Mar 10, 2023
1 parent 5e4d268 commit 678f792
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/professor/events/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const CreateEvent = (): ReactElement => {

const { valid } = useValidation(
() => {
if (/* areDatesEquals(date, new Date()) ||*/ date.valueOf() <= new Date().valueOf()) return false;
if (/* areDatesEquals(date, new Date()) ||*/ setTime(date, 0, 0, 0).valueOf() <= new Date().valueOf()) return false;

if (parseInt(start[0]) === 0 && parseInt(start[1]) === 0) return false;
if (parseInt(duration[0]) === 0 && parseInt(duration[1]) === 0) return false;
Expand Down

1 comment on commit 678f792

@vercel
Copy link

@vercel vercel bot commented on 678f792 Mar 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.