1个回答
展开全部
拖入一个button,一个textbox,一个calendar,为按钮添加click事件,代码如下:
protected void Button1_Click(object sender, EventArgs e)
{
this.Calendar1.VisibleDate = Convert.ToDateTime(this.TextBox1.Text.ToString());
this.Calendar1.SelectedDate = Convert.ToDateTime(this.TextBox1.Text.ToString());
}
protected void Button1_Click(object sender, EventArgs e)
{
this.Calendar1.VisibleDate = Convert.ToDateTime(this.TextBox1.Text.ToString());
this.Calendar1.SelectedDate = Convert.ToDateTime(this.TextBox1.Text.ToString());
}
追问
不行呀大哥,不会跳呀,TextBox里如何赋值呀。
大哥谢谢了,可以了,哈哈
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询