⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Bootstrap Theme - Search date not working



biancospinoblog

biancospinoblog
  • profile picture
  • Member

Posted 25 May 2016 - 19: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?

 


biancospinoblog

biancospinoblog
  • profile picture
  • Member

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.


GiancarloN

GiancarloN
  • profile picture
  • Member

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 /topic/1963-simple-guide-to-executing-custom-queries/#entry14231

It is a starting point about how to fix it