When using SearchBuilder, what happens when the date format is different?

When using SearchBuilder, what happens when the date format is different?

kwangseokkwangseok Posts: 10Questions: 3Answers: 0

Hello, the last question helped me a lot. I'm using SearchBuilder and the way it displays the date is different from the example. In the example, it is marked as YYYY-mm-dd, but I marked it as YYYYmmdd, so the same filter is not used. What if I want to control the date with the same filter as in the example?

Another question is, the filter is processed in dd units. What if you want to filter in mm units? Also, what if you want the current month to be displayed by default? Hope a good answer.

This question has accepted answers - jump to:

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • kwangseokkwangseok Posts: 10Questions: 3Answers: 0

    http://live.datatables.net/qahogulo/1/

    Sorry for not recognizing. Here is the link.

  • kwangseokkwangseok Posts: 10Questions: 3Answers: 0

    What I am curious about is how to display the date by month through SearchBuilder when the date expression is yyyymmdd and how to display the current month as the default. Thank you.

  • colincolin Posts: 15,237Questions: 1Answers: 2,599
    Answer ✓

    As I see, thanks for the example. By default, SearchBuilder will use the same data as used in the display. If you want it to be different, you can use orthogonal data - see example here.

    Colin

  • kwangseokkwangseok Posts: 10Questions: 3Answers: 0

    Thank you for answer. I'll ask you one more thing. How do I pre-set filters when loading data?

  • colincolin Posts: 15,237Questions: 1Answers: 2,599
    Answer ✓

    You can use searchBuilder.preDefined to set a predefined search query - see example here,

    Colin

This discussion has been closed.