Dongzhi Yang7528784
Posts: 0
Joined: Mon May 11, 2015 6:28 am

How to use query service with datepicker value

Hi,

I am mapping a datepicker on a page to a query service , by which I hope to filter the response records by the "date" value of the datepicker.

I have set up the following JS:

return '{"date":"'+value+'"}';

where "date" is the field name of the datetime field in the database collection.

But it doesn't work.

I noticed that the date format of datepicker is mm/dd/yyyy and in database collection it is yyyy-mm-dd. I wonder if this is the problem.

Please let me know what is the correct way.

Thanks

Dongzhi Yang7528784
Posts: 0
Joined: Mon May 11, 2015 6:28 am

How to use query service with datepicker value

Hi Alena,

I don't find the link answered my question.
I have mapped my datepicker component with "where" in my query service, which should return records with date value same as date picker.
But failed.
The date format in database is different from date format of datepicker, after I changed the date format in datepicker, it worked.

Return to “Issues”