Jump to:

23493 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » CustomSearchContext and SearchFields for Date range

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 1273 Views
  • Terminator4
    Avatar
    Community Member
    81 Posts

    CustomSearchContext and SearchFields for Date range Link to this post

    Hi,
    I would like to setup the CustomSearchContext and SearchFields for Date range using one and/or two date boxes such as "From date" and "To date" and then be able to use the innate SS functionality for searching for such a range.

    Please help.

    Thanks

  • Enclave SSC
    Avatar
    Community Member
    31 Posts

    Re: CustomSearchContext and SearchFields for Date range Link to this post

    I would also love to know how to do this. I have seen WithinRangeFilter but cannot find anything on its use. Also appears incomplete. Is there anything that can be done without being to hackish?

    I mean searching a single Date field for a range should be possible or at least the ability to add duplicate search context fields one for Greaterthan and one for Lessthan.

  • Jedateach
    Avatar
    Forum Moderator
    227 Posts

    Re: CustomSearchContext and SearchFields for Date range Link to this post

    +1 for seeing the WithinDateRange filter and field working.

    ..further to Enclave's suggestion I can imagine the SearchFilter form system allowing you to choose either:
    search value,
    search between,
    search greater than,
    search less than

    ie allowing the user to customize how the search is done on the form, and the form will modify itself appropriately, such as showing two input boxes for searching between values.

    ..this should be made into a trac ticket, or discussed on the ss google dev group to actually see / hear about any progress.

  • swaiba
    Avatar
    Forum Moderator
    1792 Posts

    Re: CustomSearchContext and SearchFields for Date range Link to this post

    Sorry for my ignorance, but are you guys talking...
    * searching the site
    *forms
    *model admin?

    I'm adding this to model admin soon, I don't see a problem in doing so...

    1273 Views
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.