SearchBuilder: Close modal when clicking search button?

SearchBuilder: Close modal when clicking search button?

fernandodelvalle_mmmfernandodelvalle_mmm Posts: 6Questions: 1Answers: 0

Hi,

I'm using SearchBuilder with server side processing, I have configured SearchBuilder to be used with buttons options and liveSearch = false. I was wondering if it's possible that when I press the Search button that the SearchBuilder modal closes automatically.

Thanks!

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 61,839Questions: 1Answers: 10,134 Site admin
    Answer ✓

    Hi,

    Its a nice idea, but I'm afraid there is no option for that at the moment. When I'm next working on SearchBuilder I'll take a look at this.

    Allan

  • fernandodelvalle_mmmfernandodelvalle_mmm Posts: 6Questions: 1Answers: 0

    I have another question regarding SearchBuilder. I have a date field type for SearchBuilder that's a date of birth. Right now the included datetime picker only allows me to choose from the year 1999. Is it possible to change this to earlier years?

  • fernandodelvalle_mmmfernandodelvalle_mmm Posts: 6Questions: 1Answers: 0

    @allan aside from the last question, I also noticed when I choose a date from the datetime picker in SearchBuilder I have the format MM/DD/YYYY. After I click the search button, close the SearchBuilder modal and reopen the SearchBuilder modal again, the format shown is YYYY-MM-DD HH:MM:SS. Not sure if that's the expected behavior.

  • allanallan Posts: 61,839Questions: 1Answers: 10,134 Site admin

    No its not. The format shouldn't change.

    Added to the list!

    Allan

  • fernandodelvalle_mmmfernandodelvalle_mmm Posts: 6Questions: 1Answers: 0

    Thanks @allan. One last question, I have a date field type for SearchBuilder that's a date of birth. Right now the included datetime picker only allows me to choose from the year 1999. Is it possible to change this to earlier years? Thanks!

  • allanallan Posts: 61,839Questions: 1Answers: 10,134 Site admin

    There is an option for the available year's in DateTime - but that isn't made accessible via SearchBuilder. What you could do though is to set the default value and that should do it. See yearRange.

    Allan

  • fernandodelvalle_mmmfernandodelvalle_mmm Posts: 6Questions: 1Answers: 0

    Great, I'll take a look at the yearRange option. Thanks!

    Another thing I noticed @allan, when using SearchBuilder with serverSide = true, when I choose the data field, the condition and then the input appears, when I click on the input to type but I hit the Enter key from the keyboard the whole page does a refresh. Just to report it in case that's not the intended behavior.

    Thanks again!

  • allanallan Posts: 61,839Questions: 1Answers: 10,134 Site admin
    Answer ✓

    No it is not. Thanks for letting me know about that. Do you have a form around the whole table and container perhaps?

    Allan

  • fernandodelvalle_mmmfernandodelvalle_mmm Posts: 6Questions: 1Answers: 0

    @allan thank you for that. There was a form tag involved but not on the table. I had moved the SearchBuilder button with jquery to another section of the HTML and I didn't realize that section had a form tag. Thank you for guiding me to the situation!

Sign In or Register to comment.