Skip to content
Advertisement

Change dates in fixed link and execute link

I have link like this: http://xyz.zxy.com/getTRZ/?id=BB195E05&dateFrom=03.11.2020&dateTO=03.11.2020

How to create a form with two input date fields and combine them into one link like one above? I want to pick dateFrom and dateTo separately and click GO to visit the link.

Is that possible to create in HTML? I would like to put it in my bookmark because I use the link lot of timesa a day. Thanks

Advertisement

Answer

There’s a few ways of doing it, including this one:

<form action="http://yourdomain.com/" method="get">
<input type="text" name="id" value="foo">
<input type="text" name="dateFrom">
<input type="text" name="dateTo">
<input type="submit">
</form>

If you want a datepicker on the date fields,check out https://jqueryui.com/datepicker/

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement