SearchBuilder / date
SearchBuilder / date
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
SearchBuilder examples
https://datatables.net/examples/searchbuilder/initialisation/date.html
Hello, I am French, so in this example, the dates are displayed as 28/11/2008.
If I select 28/11/2008 in the picker—setting Start date = 28/11/2008—it results in 11/28/2008 and returns no rows (the same happens if I use 2008-11-28).
This question has an accepted answers - jump to answer
Answers
That does indeed appear to be broken - my apologies. I'm in the UK so see it immediately as well. I'll look into it and get back to you. It is possible it might not be next week, but the following one, however, I'll try to make it sooner if I can
.
Allan
I've committed a fix for this issue now, and it is now in the nightly build for SearchBuilder. If you get a chance to try it out, that would be most welcome.
The is a catch - it does require either Moment or Luxon to be loaded on the page. The locale formatter causes the format to change, and therefore Moment or Luxon are needed to "decode" it.
I need to have a deeper think about how to solve that more robustly. ColumnControl has its own workaround for that, but SearchPanes will have a similar issue soon, and it is here in SearchBuilder as well.
For the moment, use Moment or Luxon like in the example, but this is something I will be aiming to address longer term.
Allan