Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(proposal): add validation to start time #3991

Merged
merged 5 commits into from
Jun 20, 2023

Conversation

Todmy
Copy link
Contributor

@Todmy Todmy commented Jun 13, 2023

Issues

#334

Fixes #
Set starting date not greater than the current time. Restrict users to enter lower time than the current time

How to test

  1. Create Proposal
  2. Try to enter the start date/time lower than the current time

To-Do

  • [ ]

Self-review checklist

  • I have performed a full self-review of my changes
  • I have tested my changes on a preview deployment
  • I have tested my changes on different screen sizes (sm, md)
  • I have tested my changes on a custom domain

Additional notes or considerations

(Include any other relevant information or context that may be helpful for the reviewer)

@Todmy Todmy requested a review from samuveth June 13, 2023 15:42
@vercel
Copy link

vercel bot commented Jun 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
snapshot ⬜️ Ignored (Inspect) Visit Preview Jun 20, 2023 2:42pm

@Todmy Todmy self-assigned this Jun 14, 2023
@samuveth samuveth requested a review from bonustrack June 15, 2023 04:28
src/views/SpaceCreate.vue Outdated Show resolved Hide resolved
@@ -39,6 +40,17 @@ watch(open, () => {
time.value = `${h}:${m}`;
input.value = dateString;
});

watchEffect(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this needed now?

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay I see now, but when I enter a time in the past the input is no longer functioning

Copy link
Contributor Author

Choose a reason for hiding this comment

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

could you specify the way you did it? This code should prevent entering past time.
p.s.: for more clever users I added an extra check here and here :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

@samuveth samuveth Jun 16, 2023

Choose a reason for hiding this comment

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

Instead of filling the input automatically with the current time, we should let the user enter time in that past and when he clicks "Select" we should show a warning and prevent "Select"

@Todmy Todmy requested a review from samuveth June 16, 2023 18:43
Copy link
Contributor

@samuveth samuveth left a comment

Choose a reason for hiding this comment

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

tACK

@samuveth samuveth merged commit abf53c7 into develop Jun 20, 2023
@samuveth samuveth deleted the todmy/restrict-proposal-start-time branch June 20, 2023 23:55
ChaituVR added a commit that referenced this pull request Jun 22, 2023
ChaituVR added a commit that referenced this pull request Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants