Menu

#5 jumptodate widget issue

open-accepted
5
2009-10-19
2009-10-13
Anonymous
No

the JumpToDate widget will only display the years 2000 - 2009. Using the text link will allow navigation to years beyond 2009 and events have been posted to dates in 2010. How can I change the years in the date range. Running Plone 3.2.3 and CalendarX v0.9.0(dev)

Discussion

  • lupa zurven

    lupa zurven - 2009-10-19

    Aye, that's a problem, although it wasn't when I first coded that back in 2004. Who'd of thunk there'd still be people using CalendarX in 2010? To fix it for yourself, go into the source code folder for CalendarX, find the skins folder, and the CalendarX folder inside that, and the file CX_props_macros.pt page template. On line 166, we find the hard-coded array used for the JumpToDateWidget is set for range(2000,2010). Set this range for something else, like range(2005,2015). After that you should be done. I don't even think that you'll need to restart Plone or uninstall/reinstall CalendarX, although you might. It won't hurt. Just keep the syntax the same, save a copy of the original, backup your harddrive often, yada yada.

    What should be added is a way to change these values in the Admin panel. Maybe someday I'll do that.

     
  • lupa zurven

    lupa zurven - 2009-10-19
    • status: open --> open-accepted
     
  • lupa zurven

    lupa zurven - 2009-10-19

    Even better, set the range using currentDate to make it start 5 years before the present year, and 5 years into the future: change
    range(2000:2010)
    to:
    range(currentDate.year()-4,currentDate.year()+6)

     

Log in to post a comment.