- Home
- Forum
- Angular - EJ 2
- Query builder filtering dates null
Query builder filtering dates null
Hello,

How can I filter in query builder where a date is null?
Should I change the operators of the field?
Thank you
SIGN IN To post a reply.
7 Replies
1 reply marked as answer
MK
Mohan Kumar Ramasamy
Syncfusion Team
August 14, 2020 04:49 PM UTC
Hi Rafael,
We have checked your reported query, we can achieve your requirement using operators field in column property. Please refer below code snippets.
|
dateOperators = [
{ value: 'equal', key: 'Equal' },
{ value: 'isnull', key: 'Is Null' }
];
filter: ColumnsModel[] = [
{
field:"EmployeeID", label:"Employee ID", type:"number"
},
{
field:"FirstName", label:"First Name", type:"string"
},
{ field:"Title",label:"Title", type:"string" },
{ field:"HireDate", label:"Hire Date", type:"date" ,format:"dd/MM/yyyy", operators: this.dateOperators }
];
<div class="col-lg-12 control-section">
<ejs-querybuilder #querybuilder class="row" width="70%" [columns]="filter" [dataSource]="dataSource"
(created)="createdControl()">
</ejs-querybuilder>
</div> |
For your reference, we have prepared a sample based on this ,please refer below link.
But currently Null value support not available in date type field, so we cannot generate predicate.
Please let us know, if you need any further assistance.
Regards,
Mohankumar R
RA
Rafael
August 14, 2020 05:26 PM UTC
Hello Mohankumar,
There's another way that I can make a custom filter to get where date is null? If don't do you have any plans to implement this?
Thank you
MK
Mohan Kumar Ramasamy
Syncfusion Team
August 17, 2020 04:40 PM UTC
Hi Rafael,
We have checked your reported requirement “Need to generate predicate for date type with null value”. And we would like to let you know that currently we are not having this support in our Querybuilder. However, we have considered this as a feature, and it will be available in any of our upcoming releases. You can track the status in the below feedback link.
Link: https://www.syncfusion.com/feedback/17066/need-to-generate-predicate-for-date-type-with-null-value
Regards,
Mohankumar R
Marked as answer
RA
Rafael
August 17, 2020 04:44 PM UTC
Hi Mohankumar,

Thank you very much, would be nice!
Ps. The link that you sent, I got "Page not found" ( https://www.syncfusion.com/feedback/17066/need-to-generate-predicate-for-date-type-with-null-value )
MK
Mohan Kumar Ramasamy
Syncfusion Team
August 18, 2020 12:02 PM UTC
Hi Rafael,
We have checked your reported link, it is getting opened correctly. There might have been network issues when you tried to open. Could you please check again.
Regards,
Mohankumar R
RA
Rafael
August 18, 2020 01:04 PM UTC
Hi,
Now it's opening.
Thank you
MK
Mohan Kumar Ramasamy
Syncfusion Team
August 19, 2020 07:48 AM UTC
Hi Rafael,
Thanks for update.
This fix will be available in any of our upcoming patch release. Until then we appreciate your patience.
Regards,
Mohankumar R
SIGN IN To post a reply.
- 7 Replies
- 2 Participants
- Marked answer
-
RA Rafael
- Aug 13, 2020 10:36 PM UTC
- Aug 19, 2020 07:48 AM UTC