Further testing reveals some strange behavior:
(1) If the <textbox> for the Date field is the *first* field inside the
<form>, then its datepicker appears - ie, using the following code, the
datepicker appears:
<body onload={PikadayControl.init date_nid}>
<form>
<textbox{#DateField} id={date_nid}/>
<textbox{#NameField} />
<submit action={add_thing} value="Add !"/>
</form>
</body>
(2) But if the Date field is *not* the first field inside the <form>, its
datepicker does *not* appear:
<body onload={PikadayControl.init date_nid}>
<form>
<textbox{#NameField} />
<textbox{#DateField} id={date_nid}/>
<submit action={add_thing} value="Add !"/>
</form>
</body>
The above two code fragments are identical, except for the *ordering* of
the fields inside the <form>.
(3) Also, if there is a string before the Date field, the datepicker does
not display:
<body onload={PikadayControl.init date_nid}>
<form>
Date: <textbox{#DateField} id={date_nid}/><br/>
Name: <textbox{#NameField} />
<submit action={add_thing} value="Add !"/>
</form>
</body>
(But I'm not sure if strings such as "Date:" and "Name:" are actually
allowed in that position, inside a <form>.)
Discussion:
For some reason, the datepicker only appears when the Date field is the
*first* element in the <form>.
I am curious why this is happening.
Thanks for any help!
###
_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur