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

### Restrict past dates and times from date time now #389

Closed
wants to merge 9 commits into from

Conversation

GarethStar
Copy link

@GarethStar GarethStar commented Jul 15, 2017

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature with doc update

What is the current behavior? (You can also link to an open issue here)
Does not disable the past times within the current day

What is the new behavior (if this is a feature change)?
Disables the past times within the current day

Does this PR introduce a breaking change?
No, its just a useful feature to filter

Please check if the PR fulfills these requirements

Other information:

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling dd0e591 on garethstar:master into 65350d3 on dalelotts:develop.

@dalelotts
Copy link
Owner

Thanks for the PR! Can you help me understand the use case? Why is so much code necessary?

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 815efb3 on garethstar:master into 65350d3 on dalelotts:develop.

@GarethStar
Copy link
Author

@dalelotts, I wanted to make it possible to disable all of today's times prior to now (I may add on offset) so that when the users of my app are selecting a call back time, there is no chance of them selecting past times.

At first I thought it would be a case of removing the midnight setter, however this then disabled the selection of the date. I managed to stop that bug only for 2 more to spawn from that. Then I kept finding bug after bug until the solution grew into this, a cleaner solution is more than welcome.

@dalelotts
Copy link
Owner

Why doesn't accepting $view as a parameter and adjust the "cut-off date" work for this use case?

@GarethStar
Copy link
Author

@dalelotts i haven't tried that, i'll look into it on Monday, i'll let you know how it goes. Thanks

@GarethStar
Copy link
Author

GarethStar commented Jul 17, 2017

@dalelotts Cheers, using the view parameter works great

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling ef64cf2 on garethstar:master into 65350d3 on dalelotts:develop.

@dalelotts dalelotts closed this Oct 24, 2017
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.

None yet

4 participants