I have a start date which is put in a textbox by the user trough a jquery date picker.
I also have an end date textbox which I want to fill with the start date value when the user changed the value of the start date.
So I was thinking of doing a JavaScript and than a when textbox has changed enter value into end date textbox but I don't know how this would be done.
Thank you guys for helping since I am new to JavaScript.
If it is this calendar, (which it looks like from your own "answer"), you could do something like this. It will set "date end" and pop up calendar for it when "date from" is selected:
If you do not want the calendar-end to pop up, remove:
Original answer as per your statement "[…] trough a jquery date picker […]" in question text.
jQuery UI variant:
Use
onSelect
event.Simple demo:
You could also add for change event on element, but not sure how user-friendly that would be.
This is just the simple method below,but if you need something other,let me know
Here is the working code for what you have asked.
And working JSFiddle(Here)
and your start date textbox-