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

Feature: PDateRangeSelect #1048

Merged
merged 31 commits into from
Dec 12, 2023
Merged

Feature: PDateRangeSelect #1048

merged 31 commits into from
Dec 12, 2023

Conversation

pleek91
Copy link
Collaborator

@pleek91 pleek91 commented Dec 11, 2023

Description

The date range select is a new component for selecting date ranges either of a fixed date/time or a relative time span like "Past 15 minutes".

It has a single v-model that returns a value based on the user's selection. If a relative value is selected the number of seconds in the selected span is returned. If a fixed range is selected the start and end dates are returned. This value can be type guarded with the modelValue.type which is either span or range

Recommend checking out the deploy preview and playing around this the component.

Relative span
image
image

Fixed date range
image
image

Copy link

netlify bot commented Dec 11, 2023

Deploy Preview for prefect-design ready!

Name Link
🔨 Latest commit c85c433
🔍 Latest deploy log https://app.netlify.com/sites/prefect-design/deploys/65789a41b34f5000080988e2
😎 Deploy Preview https://deploy-preview-1048--prefect-design.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated because the PDatePicker component has the floating styles now. I think "Picker" implies its not designed to be put directly on the page.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Functionally the same except one tweak to makes sure the startDate and endDate are startOfMinute and endOfMinute respectively. Added an event for when the range is applied.

@zhen0
Copy link
Member

zhen0 commented Dec 12, 2023

Being able to select the relative time windows and to scroll through them is very cool!

@pleek91
Copy link
Collaborator Author

pleek91 commented Dec 12, 2023

@zhen0 I think I address all of your comments if you'd like to look at this again.

@zhen0
Copy link
Member

zhen0 commented Dec 12, 2023

Is it possible to have it so I can select a specific end time? It keeps resetting when I try to change the end time

Screen.Recording.2023-12-12.at.11.19.59.AM.mov

@zhen0
Copy link
Member

zhen0 commented Dec 12, 2023

Sorry @pleek91 one other thing I didn't catch in my first run through. The rest is looking nice!

@pleek91
Copy link
Collaborator Author

pleek91 commented Dec 12, 2023

@zhen0 what browser? I don't have any issues changing the times in chrome.

@znicholasbrown
Copy link
Contributor

Ah please ignore my review, that was supposed to be a comment; I've seen the behavior @zhen0 is describing. It's also easy to break the input by accidentally pressing > 4 numbers while the year is selected in the calendar view. The only way to escape that that I've found is to refresh

@pleek91
Copy link
Collaborator Author

pleek91 commented Dec 12, 2023

@znicholasbrown I can reproduce the > 4 numbers in the year position. Will investigate. Still unable to reproduce the other issue. Maybe one of you can pair with me on that

@znicholasbrown
Copy link
Contributor

@pleek91 select a date range (any date will do) then select the end time hour and press "0" to replicate that one I believe, lmk if that doesn't do it for you

@pleek91
Copy link
Collaborator Author

pleek91 commented Dec 12, 2023

@znicholasbrown ah yep the "0" works. TY

@pleek91 pleek91 reopened this Dec 12, 2023
@znicholasbrown
Copy link
Contributor

Sorry, I did not mean to close this with my comment, that shouldn't be an option for a maintainer lol

@pleek91
Copy link
Collaborator Author

pleek91 commented Dec 12, 2023

@znicholasbrown and @zhen0 I believe I've fixed the two issues you ran into.

@zhen0
Copy link
Member

zhen0 commented Dec 12, 2023

Yep! LGTM!

@pleek91 pleek91 merged commit 940128a into main Dec 12, 2023
5 checks passed
@pleek91 pleek91 deleted the date-range-select branch December 12, 2023 17:46
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