+ Start a Discussion
rubel rana 6rubel rana 6 

Showing results in a date range from date picker

Hi folks !!

I want something like,  From date - To date. User can select the dates, and I will show the results between the dates.
I can do something like this :User-added image
Date from_date = Date.newInstance(2021,10,10);
Date to_date = Date.newInstance(2019,3,20);
list<contact> a = [select name from contact where
(CreatedDate >=: from_date) AND CreatedDate <=: to_date) ];

Here, I put the values of the dates manually. I want to know that, when I will click on the submit button, how can I get the values from the date pickers and put them into a variable manually?

[ In PHP I did something like this task, I am new in Salesforce. I collected the values of the variables from the date picker using jquery. In Salesforce, don't know how to do it?]

Thanks in advance.
Dushyant SonwarDushyant Sonwar
You can implement this date picker using Jquery in Salesforce
https://www.jqueryscript.net/demo/Calendar-Date-Picker-Component-Tui/
rubel rana 6rubel rana 6
Thanks