private void BindDate()
{
tbApplyStartDate.Attributes.Add("onclick", "new Calendar().show(this)");
tbApplyEndTime.Attributes.Add("onclick", "new Calendar().show(this)");
tbOfficialStartTime.Attributes.Add("onclick", "new Calendar().show(this)");
tbOfficialEndTime.Attributes.Add("onclick", "new Calendar().show(this)");
tbRealEndTime.Attributes.Add("onclick", "new Calendar().show(this)");
tbCheckTime_zdb.Attributes.Add("onclick", "new Calendar().show(this)");
tbCheckTime_zjb.Attributes.Add("onclick", "new Calendar().show(this)");
tbApplyStartDate.ReadOnly = true;
tbApplyEndTime.ReadOnly = true;
tbOfficialStartTime.ReadOnly = true;
tbOfficialEndTime.ReadOnly = true;
tbRealEndTime.ReadOnly = true;
tbCheckTime_zdb.ReadOnly = true;
tbCheckTime_zjb.ReadOnly = true;
}
这个实例代码是给TextBox添加日历效果的