gokuney / jquery-events-calendar

Automatically exported from code.google.com/p/jquery-events-calendar
0 stars 0 forks source link

Human readable dates not parsing correctly #12

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use the human readable date format, with data like this:
{"date":"2013-08-07 13:30:00","type":"Sale","title":"Test 
Event","description":"...description goes here...","url":"\/home.html"}

2. Make sure that the data has events in August or September, and that the data 
includes leading zeroes in front of the month field.

What is the expected output? What do you see instead?

Expected output is for the event to be output in the calendar for August, 
however it is not shown.

What version of the product are you using? On what operating system?
Using v0.53 on a CakePHP-driven website.

Please provide any additional information below.

I fixed this issue by modifying the plugin source as follows:

This problem is caused by the parseInt seeing "08" & "09" as octal values due 
to the leading zero, and incorrectly parsing them as "0" rather than 8 or 9.

- line 326 change to
        eventMonth = parseInt(eventDate[1], 10) - 1,
- line 329 change to
        eventMonthToShow = parseInt(eventMonth, 10) + 1,

Hope this helps someone...

Cheers,
sherlyn

Original issue reported on code.google.com by sher...@pixelopolis.com on 18 Apr 2013 at 11:24