Board Logo

Selected date different then form date
kengull - 6/15/2009 at 08:34 PM

I want my form to have a default date of 12/31/2999, but the popup calendar selected date to be todays date. I tried the setup as below, but it didn't work. It seems the selected date is always whatever date is input into the field.

Help please?

<input type="text" name="PUdate" value="12/1/2999" size="10">
<script language="JavaScript">

// - set selected day to today
var d_selected = new Date();
d_selected.setDate(d_selected.getDate() );
var s_selected = f_tcalGenerDate(d_selected);

new tcal ({
// form name
'formname': 'swfpu_entry',
// input name
'controlname': 'PUdate',
'selected' : s_selected



Back to forum: