How do I get the value of the field #id_start_date if the date is populated already?
I tried this:
var sd = $("#id_start_date").val();
$("span.start_date").text(sd);
and also tried putting it inside a .change() or .click() but it didn’t work due to it being changed by the program and not manually.
edit
Here is the form section of my html.
....
<tr>
<th>Start date</th>
<td><input id="id_start_date" type="text" class="datepicker date_field" name="start_date" size="14" /></td>
</tr>
....
Any thoughts or suggestions?
Steve
I found out what my issue was and I figured I would post it here in case any others come across a similar issue.
There was an AJAX call being made that had the start_date in it, so I placed the code inside the AJAX call and it worked.
For some reason, the .change() doesn’t fire when its being populated this way so I was never able to get the value unless I went inside the AJAX call.
Thanks everyone for your input.