-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fix(datepicker): Maintain selected date when same date selected (#5209) #5496
fix(datepicker): Maintain selected date when same date selected (#5209) #5496
Conversation
…r-software#5209) Use getTime() for JS dateTime compare.
This does not exactly solve what the issue requests. Based on what was found in code and what the issue requests this update does solve the requester's issue of maintaining the 'today' string. When the Date value is set in the bs-datepickerDirective component there is a check for the same value. I believe the intention was to check if the same date was selected and return immediately if so. Otherwise continue and propagate the change to the other components with this.bsValueChange.emit(value). It compares 2 date objects which would always return false even if they are the same date. To summarize, this change may solve a separate but overlapping issue. Custom text inputs would require separate and additional changes. I look forward to your feedback. Please let me know how to proceed. Thanks much, Jim. |
Codecov Report
@@ Coverage Diff @@
## development #5496 +/- ##
============================================
Coverage 52.52% 52.52%
============================================
Files 3 3
Lines 99 99
Branches 17 17
============================================
Hits 52 52
Misses 37 37
Partials 10 10 Continue to review full report at Codecov.
|
I think, it can be useful. |
hey, @castriganoj |
…r-software#5209) (valor-software#5496) fix(datepicker): Maintain selected date when same date selected (valor-software#5209) (valor-software#5496) Co-authored-by: Vitaliy Makogon <mvitaliyd@gmail.com> Co-authored-by: Dmitriy Danilov <daniloff200@gmail.com>
Use getTime() for JS dateTime compare.
closes #5209
PR Checklist
Before creating new PR, please take a look at checklist below to make sure that you've done everything that needs to be done before we can merge it.