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

Week view: Highlighted days don't match filtering #10

Closed
mrclay opened this issue Sep 27, 2011 · 8 comments
Closed

Week view: Highlighted days don't match filtering #10

mrclay opened this issue Sep 27, 2011 · 8 comments

Comments

@mrclay
Copy link

mrclay commented Sep 27, 2011

The URL event_calendar/list/2011-09-27/week/all filters 25 Sep - 1 Oct, but Sept 24th is highlighted.

Similarly event_calendar/list/2011-09-11/week/ filters 11 Sep - 17 Sep, but the 10th and 18th are highlighted.

@kevinjardine
Copy link
Owner

I can't reproduce that.

I tested that quite a bit before on my development server (which is based in Arizona) to make sure that the proper week days are highlighted.

I've tested in just now on my server and it still works.

So unfortunately it appears to be something server specific.

@kevinjardine
Copy link
Owner

For the time being the JS that highlights the week is embedded in this file:

event_calendar/views/default/input/datepicker_inline.php

Can you see anything there that might not work on your server?

@mrclay
Copy link
Author

mrclay commented Sep 27, 2011

Before I dig into this, do you know if any of the dates are are relying on the client (new Date())?

@kevinjardine
Copy link
Owner

It's all done in JS, so definitely client code, true. So the difference might be with your server or your client.

@mrclay
Copy link
Author

mrclay commented Sep 27, 2011

OK, I'll look into that. Our server has the same TZ as my desktop (confirmed outputting date('g:i') in the calendar view). That won't be true testing an AZ host from UK.

@kevinjardine
Copy link
Owner

ah, that may be a crucial difference. I will see if I can find a way to implement the week highlight that is more client/server independent.

Suggestions are welcome!

@kevinjardine
Copy link
Owner

Just to note that the old jQuery datepicker had a built-in feature to highlight the week but the powers-that-be removed it in the latest version. Hence I was forced to code up something myself which clearly doesn't take all cases into account.

@kevinjardine
Copy link
Owner

When looking at the code, I noticed that the JS used the UTC time but no such qualifier was added on the PHP side.

I've added the UTC timezone qualifier to the PHP bit as well so that the datepicker should now be comparing apples to apples. I'm hoping that if everything is converted to UTC it should fix this bug.

Nothing broke for me (as you noted, I have a large timezone difference between client and server). How does it look on your side?

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

No branches or pull requests

2 participants