Set selected index and calendar date programatically

How can I set the selected index of a select input programatically?

Also, how can i clear a textbox attached to a calendar so wehn the calendar opens up, it is on the current date instead of on the previous date that had been cleared?


Well I found how to see the select:

var options = getSelectOptions(“name”);
options[index].selected = true;

Anybody have an idea on the calendar?


for calendar input you can use:
myForm.getInput(name).value = “”;