I use jQuery Date Picker for one of the form fields - Date of Birth.
The field is created using PHP and will be populated with the user's original date of birth. When you click on a field, a widget appears that works great.
However, the text box does not display the original value, even if it is displayed in the source code of the browser. I am using Google Chrome.
The following is jQuery code:
$(function() { $("#DatePicker").attr("readonly","readonly"); $("#DatePicker").datepicker({ changeMonth: true, changeYear: true, yearRange: "1950:+10" }); $("#DatePicker").datepicker("option","dateFormat","dd MM yy"); });
This is the PHP code:
echo "<INPUT TYPE=\"TEXT\" NAME=\"$FieldName\" VALUE=\"$OriginalData\" ID=\"DatePicker\" CLASS=\"FullLength\">";
And the following HTML code (copied from source):
<INPUT TYPE="TEXT" NAME="DateOfBirth" VALUE="18 August 2012" ID="DatePicker" CLASS="FullLength">
Please tell me what happened. Thanks.
source share