Jump to content


Bootstrap Theme - Search date not working

bootstrap search date

  • Please log in to reply
2 replies to this topic

#1 biancospinoblog

biancospinoblog

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 25 May 2016 - 07:06 PM

Hi,
I purchased the Bootstrap theme but the search on a column datetime will not work.

In config/grocery_CRUD.php I have:
// There are only three choices: "uk-date" (dd/mm/yyyy), "us-date" (mm/dd/yyyy) or "sql-date" (yyyy-mm-dd)
$config['grocery_crud_date_format']            = 'uk-date';

but the search works only if I write a date in the column search field in format yyyy-mm-dd instead of dd/mm/yyyy
Maybe there is another setting somewhere?

 



#2 biancospinoblog

biancospinoblog

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 26 May 2016 - 08:48 AM

Ok I've found a solution to my problem, sure it's not the best solution but only a workaround.

Probably the bootstrap theme works in a different manner due to data loaded with Ajax so we have to use date type fields with a sql format (yyyy-mm-dd) and we can't search data presented with a label through a callback.

My label "Close" became "2:Close" so the user inserts the code "2" that I've used on the database.



#3 GiancarloN

GiancarloN

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 14 July 2016 - 07:18 AM

Hello,

about searching data presented in a different manner from database values (through using a callback), I think you can read what I have described here about extending set_ajax_list_queries method http://www.grocerycr...ies/#entry14231

It is a starting point about how to fix it







Also tagged with one or more of these keywords: bootstrap, search, date

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users