// protected void btnOK_Click(object sender, EventArgs e)
{
//设置日历控件在页面中的位置(截取按钮所在位置,设置日历所在位置)
Calendar1.Style["TOP"] = (Convert.ToInt32(btnOK.Style["top"].Substring(0, btnOK.Style["top"].IndexOf("p"))) + 24) + "px";
Calendar1.Visible = !Calendar1.Visible;//当隐藏时显示,显示时隐藏
}
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
//从日历中截取如"2010-4-14"这样的日期格式
txtDate.Text = Calendar1.SelectedDate.ToString().Substring(0, Calendar1.SelectedDate.ToString().IndexOf(" ")).ToString();
Calendar1.Visible = false;
}