cancel
Showing results for 
Search instead for 
Did you mean: 

Daterange form control on Advanced Search

douglascrp
World-Class Innovator
World-Class Innovator
Hey.

When using the daterange.ftl control on my advanced search form, if I select the same date on "from" and "to", I got no result, since the parameters sent to the server are the same, both defined as "date + 00:00:00".

The parameber being sent in this case is
prop_custom_date-date-range":"2014-05-22T00:00:00-03:00|2014-05-22T00:00:00-03:00"

How can I customize the daterange.ftl control in order to make the "to" param to be something like 2014-05-22T23:59:00-03:00 (the last minute of the date)?

Doing that, search would consider the entire day.

Thank you.
3 REPLIES 3

mlagneaux
Champ on-the-rise
Champ on-the-rise
Hello,

I think that you should override components/form/date-range.js file. It should be done in this file.

douglascrp
World-Class Innovator
World-Class Innovator
Thank you for the tip.

That's the file I was looking for… I didn't know where all the logic was defined.
Now it's just a matter of customizing it.

I'll post here the result after I finish it.

Thank you again.

douglascrp
World-Class Innovator
World-Class Innovator
It was not need to change the form control.

I found that my problem was in the attribute's index configuration.
I don't know why, but I set it as tokenized false. I changed it to tokenized and it started to work again.