Currently, I have text box that asks for a date. However, I would like to get date format like 9/13/2013
to 10/30/2013
from parameter. How can I add to date and from date to text box?
2 Answers
I believe you want a single text box to display the From and to dates. You can do this by referencing the parameters directly from your text box.
With the cursor flashing indicating you can type in the text box, right click it and select Create Placeholder
In the popup that appears click the fx button
Set the value to be the FromDate parameter
- Set the format of the expression by clicking the Number tab of the popup, and selecting the date format you want, as shown
Then back in the text box carrying on writing in normal text "to"
Repeat steps 1 to 4 for the ToDate
The result should look something like this in design mode...
- ...and like this in preview mode
Hopefully this is the output you were imagining. If not, please let me know and I shall try to help further.

- 2,988
- 2
- 24
- 33
As far as I understand your question, you want something like this:
<span>To:</span><input type="date" id="toDate"/><span>From:</span><input type="date" id="fromDate"/>
In this case, the resulting page will have a textbox for a "to" date and a "from" date, both with a mm/dd/yyyy template built in. From here, you could then get the text box using document.getElementById, or jQuery, then get the value, and use subtract the dates. For date wrangling, I highly recommend moment.js, by the way.

- 1,299
- 11
- 30
-
Do I add that formula through expression? – HAIZD Oct 26 '15 at 17:50
-
Oops, I gave you HTML, I'm really sorry. I thought you were using html & css. I guess I didn't look at the tags. – Alexis Dumas Oct 26 '15 at 18:19