Another way is to add the javascript's function to the Text control's onBlur attribute.
Example :
In your code behind, you may do this
protected void Page_Load(object sender, EventArgs e)
{
this.txtName.Attributes.Add("onBlur", "return CalculateDate();");
}
:-)
Balaji