SearchBuilder + moment/luxon: not sending date value to server

SearchBuilder + moment/luxon: not sending date value to server

Benz738Benz738 Posts: 1Questions: 1Answers: 0

Link to test case: https://codesandbox.io/p/live/bb471f34-844d-4ae4-b2c8-233e0fa4ab1f
Description of problem:

Hello!

This is my first post here, I'm using Datatables since many years.. I describe myself as an affecionate user :smiley:
Jokes apart, in these years, I wasn't able to find all the features of this library anywhere else, so let me say thank you for this!

Now let's talk about the issue I've encountered:

While upgrading an existing table to use the Editor backend + SearchBuilder, I had to localize the datepicker used by SearchBuilder, and noticed that after importing moment (or luxon), the date selected as filter is not sent in the server request.

You can find the problem reproduced on codesandbox, it's the first time I use such tool for a client+server application... anyway the setup is simple and should work for you as well.

The javascript code is inside pages/script.js.
The response json is a mocked, as it's not important to reproduce the issue.

Steps to reproduce:
1. Open the browser console
2. Set SearchBuilder by selecting the "Start date" field -> Equals -> Select a date
3. Now check the request sent and you will see this:

You can also unload moment.js from the html / js and see that without them, the date is sent correctly:

Let me know if you need further info!

Regards

Sign In or Register to comment.