You can clone with
No one assigned
Before reporting a problem, please UPDATE TO LATEST SVN.As this is a community-driven project, the developers onlyhave time available to fix problems reported in the LATESTcode. You are welcome to report problems in any otherversion, but until you have upgraded to latest svn and provideda test report against that, you will be reliant on peopleOTHER than the core developers for bug-fixes. which couldhappen, so feel free to ignore the above should you so choose.
What steps will reproduce the problem?
1. Set your computer's time zone to somewhere in the western hemisphere (UTC - x, where x is positive). Do this before opening your web browser, so your web browser is synced to that time.
2. Run the DateField example, either from your copy of Pyjamas or by going to the online demo at http://pyjs.org/examples/datefield/output/DateField.html.
3. Click one of the calendar icons to bring up the popup calendar. The days are offset by one to the left (for example, it says April 1, 2012 is a Saturday instead of a Sunday).
4. Click any date to have it fill in the datefield. The date filled in does not match the displayed date you clicked on. Instead, it is the date that should have been displayed if the popup calendar were correct.
5. Click the calendar icon again. Select "Yesterday", "Today", or "Tomorrow". The date inserted into the datefield is offset one to the left of what it should be.
What is the expected output? What do you see instead?
What version of Pyjamas are you using? which svn revision number?On what operating system?
Have you attached a stack trace from using "-d" compiler option?
If using PyJD, have you attached a python stack trace?
If using PyJS, what compiler options did you use?
Please provide any additional information below.
Original issue: http://code.google.com/p/pyjamas/issues/detail?id=709 (April 03, 2012 16:43:52)
Time zone issues can be nasty. If you are in a Western time zone and desperately need a working calendar widget, you can get one by modifying Calendar.py as follows:
(1) in drawGrid
startPos = (struct.tm_wday + 2) % 7
(2) in onCellClicked
selectedDay = int(text) + 1
Extremely hackish, but it works -- the calendar dates are correct, and the selected date is filled in correctly in the textbox.