set day, month and year of MonthView

Hi,

i'd like to use MonthView control in my ASP generated website. An ASP-script generates the OBJECT-tag and a client side script to initialize the day, month and year properties.

The output results like that:

...
<FORM name="parameterform" action="http://localhost/datamart/test.asp" method="POST">

<OBJECT name="DatepickerStartdatum"
classid="clsid:232E456A-87C3-11D1-8BE3-0000F8754DA1" width="100"
height="100">
</OBJECT>

</FORM>
...
<SCRIPT language="JavaScript"
//alert("If you uncomment this, it works");
document.forms('parameterform').children('DatepickerStartdatum').day=1;
document.forms('parameterform').children('DatepickerStartdatum').month=1;
document.forms('parameterform').children('DatepickerStartdatum').year=2001;
</SCRIPT>
...

But it does not work. When setting the day property the MonthView control throws an error like "Can't set Day property when MultiSelect = True".
But MultiSelect is definitely FALSE.

And now the strange thing: If i insert an alert command before setting the Day property it will work.

What can i do? I don't want to see an alert-box everytime i load the website.

Thanks in advance
Peter
[1379 byte] By [petweg] at [2007-11-17 15:32:38]