I'm having 2 major problems right now. I'm trying to modify the
announcements web part to have today's current date appear as a
default in the Start Date field. This is my code:
<script>var frm=new OWSForm("OWSForm",true,"", "");
var MyDate = new Date
var ThisYear = MyDate.GetYear()</script>
This is how I'm trying to grab the current date. I'm trying to have
it appear here:
<SCRIPT>
fld = new DateField(frm,'<xsl:value-of
select="@fieldname"/>','<xsl:value-of
select="@name"/>',ThisYear);fld.fDateOnly = false;fld.BuildUI();
</SCRIPT>*This is a required field
but nothing appears. The strange thing is if I hard code a date into
the ThisYear variable it does appear in the dynamically created date
text input field. I've tried changing the my variable to read like
this: var ThisYear = MyDate.GetYear().toString but this does not work
either.
Do you know someone who can help? Share a link to this thread on twitter, or facebook.