Jump to:

10979 Posts in 2722 Topics by 1815 members

All other Modules

SilverStripe Forums » All other Modules » Event Module: removeStartFields and removeEndFields not working correctly

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 3417 Views
  • dfondente
    Community Member
    15 Posts

    Event Module: removeStartFields and removeEndFields not working correctly Link to this post

    I want to remove the start and end date selectors on the calendar widget. In my subclass of Calendar, I have put the following in getFilterFields():

          $fields = parent::getFilterFields(); // returns a CalendarFilterFieldSet
          // remove the date filters

    This removes most of the date selectors, but leaves the end date month in the widget. I looked in the source of event_calendar/code/CalendarFilterFieldSet.php and discovered a typo on line 61 in the function definition for removeEndFields(). I fixed this, and the date selectors are now gone from the widget. However, the form still submits empty dates for start and end date, which results in the filters not returning the correct values. When I submit the widget's form, the URL contains '/--/--', so no events show up at all.

    Any suggestions about the best way to resolve this? I could filter '/--/--' out of the URL, but this seems like a bug to me and better to fix in the event calendar module.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.