thekingsimo / jquery-week-calendar

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

Full demo displays wrong date #67

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The full demo showing how to edit events using a popup div has an error in
the date displayed when creating or editing an event.
It's the month that's wrong. Instead of showing f e 2009-08-12 it displays
2009-7-12. It's the peculiar way that Javascript deals with month numbers
that the culprit. Probably an easy fix and probably a good place to use the
soon available formatDate function.

Original issue reported on code.google.com by jolle.carlestam on 11 Aug 2009 at 4:16

GoogleCodeExporter commented 8 years ago
The immidiate fix is easy. This does it:
            $dialogContent.find(".date_holder").text(calEvent.start.getFullYear() + "-" +
(calEvent.start.getMonth() + 1) + "-" + calEvent.start.getDate());

But there's room for improvement. When the formatDate is made available it's a 
good
candidate to use here. So that 2009-8-12 shows up as 2009-08-12 and so to make 
it
easy to choose other date formats as well.

Original comment by jolle.carlestam on 11 Aug 2009 at 9:49

GoogleCodeExporter commented 8 years ago
thanks for picking this up. fixed

Original comment by robmo...@gmail.com on 12 Aug 2009 at 11:52