-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support date ranges being converted to SQL and MongoDB queries with jQuery-QueryBuilder #37
Comments
This is not something that is currently possible, but I would not mind a pull request if the functionality is appropriately implemented. Normally, with the querybuilder, you could do something like:
to just get the date. We are using QueryBuilderParser/src/QueryBuilderParser/QBPFunctions.php Lines 163 to 179 in db9a0dc
but we do not provide any options. This could be fixed by changing the way QueryBuilderParser/src/QueryBuilderParser/QBPFunctions.php Lines 226 to 241 in e8ff09c
So that it creates a correct You would need a way to be able to specify what format the date is desired to be in. A quick browse of Laravel shows it supports the following:
|
I have a database-design where the date I want to query is of the datetime-type. But when I try to select all orders that equal to todays date for example, the parser will add 00:00:00 and I will not get any results.
I usually solve this to use the mysql date function (select * from orders where order_date = date('2019-06-28')) - is there any way to do this with the QueryBuilderParser?
I now manually loop through the rules and rebuild an equals to to between and manipulate fields, but I hope this can be done more easily?
The text was updated successfully, but these errors were encountered: