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

fix(old-datepicker): summer time #3122

Merged

Conversation

mdfonseca
Copy link
Contributor

Datepicker repeat days (ex:. 15-oct-2017) when using Safari (Mac) and lang pt-BR for summer time

Problem: Opening the datepicker on Safari in a month with summer time (ex:. 2017-oct-15 - lang: pt-BR) generates a calendar containing days 1,2,3,..,14, 15, 15, 15, 15,..., 15

Context: Safari "new Date(2017, 9, 15)" for lang pt-BR generates a date like "14 oct 2017 23:00:00", then the component "daypicker.component.ts" calls "fixTimeZone()" to fix that to "15 oct 2017" but that "fixed date" is not used to get the next day, which generates a loop of tha same day in theses cases of summer time.

Fix: Used the "fixed date" while generating/selecting days for the calendar

@codecov
Copy link

codecov bot commented Nov 27, 2017

Codecov Report

Merging #3122 into development will decrease coverage by 0.03%.
The diff coverage is 0%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #3122      +/-   ##
===============================================
- Coverage        65.31%   65.28%   -0.04%     
===============================================
  Files              209      209              
  Lines             5628     5631       +3     
  Branches           990      990              
===============================================
  Hits              3676     3676              
- Misses            1689     1692       +3     
  Partials           263      263
Impacted Files Coverage Δ
src/datepicker/daypicker.component.ts 13.63% <ø> (ø) ⬆️
src/datepicker/datepicker-inner.component.ts 27.48% <0%> (-0.5%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 080d89a...ec66c9e. Read the comment docs.

@valorkin
Copy link
Member

@mdfonseca thanks for your help!
could you please check new datepicker?
does it have such issue?

@valorkin
Copy link
Member

@valorkin valorkin changed the title Fix datepicker summer time fix(old-datepicker): summer time Dec 1, 2017
@YevheniiaMazur
Copy link

@mdfonseca Could you provide more information about this issue, please (for example, create plunker sample, that reproduces this issue)? I couldn't reproduce it for Safari 11.0.1 - MacOS 10.12.06
I used locale pt(br) for MacOS for old datepicker, created start date as new Date(2017, 9, 15), also added button for calling fixTimeZone manually.

I need this info for better understanding, what and how should I check in this pr.

Thank you in advance

@mdfonseca
Copy link
Contributor Author

https://valor-software.com/ngx-bootstrap/#/datepicker -> "Old" tab

1

2

New datepicker seems ok

3
4

@YevheniiaMazur
Copy link

Tested, looks good

@valorkin
Copy link
Member

valorkin commented Dec 5, 2017

@mdfonseca can't reproduce, but I trust you :)
thanks for your time!

@valorkin valorkin merged commit 422d3bc into valor-software:development Dec 5, 2017
@ghost ghost removed the ready for merge label Dec 5, 2017
@valorkin
Copy link
Member

valorkin commented Dec 5, 2017

if all will go by plan beta.11 will go out this Thursday - Friday

@mdfonseca mdfonseca deleted the fix-datepicker-summer-time branch December 5, 2017 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants