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

DateTime picker - past time from current day can be selected #340

Closed
pbialy opened this issue Jan 18, 2018 · 7 comments
Closed

DateTime picker - past time from current day can be selected #340

pbialy opened this issue Jan 18, 2018 · 7 comments
Assignees
Labels

Comments

@pbialy
Copy link
Contributor

pbialy commented Jan 18, 2018

Hi

First of all - thank you for great library!

I found a bug tho - I'll describe it below, but I've also made a short gif to illustrate it, you can find it here or here.

Basically - If you pass "min" to your datepicker config then calendar shouldn't allow you to select a date / datetime before this "min".

So if the "min" is set to, lets say, 1st January 2017, 11:00, then you won't be able to change it to 10:00.
BUT
If you change the date to 2nd Jan and change the time to 10:00, then you are able to change the date back to 1st Jan, which results in having 1st Jan 10:00, which is before the "min".

I'll be glad if this could be fixed.
Or maybe there's some setting which allows to prevent this situation? I'll be happy to know it then.

Regards
pbialy

@vlio20
Copy link
Owner

vlio20 commented Jan 18, 2018

mmm nice one. Will mark this as bug. PRs are welcome

@vlio20 vlio20 added the bug label Jan 18, 2018
@vlio20
Copy link
Owner

vlio20 commented Jan 18, 2018

Solutions (Bug fix):

  1. Set the time to min time when there is a conflict as described above
  2. Disable the min date when time is changed (if required)

WDYT?

@vlio20 vlio20 self-assigned this Jan 18, 2018
@vlio20
Copy link
Owner

vlio20 commented Jan 18, 2018

I chose 1.

vlio20 added a commit that referenced this issue Jan 18, 2018
vlio20 added a commit that referenced this issue Jan 18, 2018
@vlio20
Copy link
Owner

vlio20 commented Jan 18, 2018

resolved in 18db1ca

@vlio20 vlio20 closed this as completed Jan 18, 2018
@pbialy
Copy link
Contributor Author

pbialy commented Jan 19, 2018

Thank you sir for ultra-fast response and bugfix :)

@vlio20
Copy link
Owner

vlio20 commented Jan 19, 2018

Your ⭐️ would be much appreciated

@pbialy
Copy link
Contributor Author

pbialy commented Jan 19, 2018

done ;)

vlio20 added a commit that referenced this issue Jan 27, 2018
* fixing #340 (#341)

* updating change log

* fixing changelog

* testing new build (#351)

* version bump
vlio20 added a commit that referenced this issue Mar 5, 2018
* fixing #340 (#341)

* updating change log

* fixing changelog

* testing new build (#351)

* version bump

* fixing issue #355 (#356)

* resolving conflict

* fixing 359

* Adding documentation for

* fixing changelog

* fixing build
vlio20 added a commit that referenced this issue Mar 12, 2018
* fixing #340 (#341)

* updating change log

* fixing changelog

* testing new build (#351)

* version bump

* fixing issue #355 (#356)

* resolving conflict

* fixing 359

* Adding documentation for

* fixing changelog

* fixing build

* version bump

* hideOnOutsideClick added (#363)

* removing redundant import

* closing 367

* fixing change log

* resolving moment value in Reactive forms (#372)

* updating changelog

* updating changelog
vlio20 added a commit that referenced this issue Apr 15, 2018
* fixing #340 (#341)

* updating change log

* fixing changelog

* testing new build (#351)

* version bump

* fixing issue #355 (#356)

* resolving conflict

* fixing 359

* Adding documentation for

* fixing changelog

* fixing build

* version bump

* hideOnOutsideClick added (#363)

* removing redundant import

* closing 367

* fixing change log

* resolving moment value in Reactive forms (#372)

* updating changelog

* updating changelog

* fixing merge + resolving 389

* moving to node 8

* adding documentation

* xit flappy test

* moving more test to xit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants