2010-08-25 77 views

回答

1

掛接到的DayRender事件

protected void SomeCalendar_DayRender(object sender, DayRenderEventArgs e) 
{ 
    if (e.Day.Date < DateTime.Now) 
    { 
     e.Cell.Text = e.Day.Date.Day.ToString(); 
    } 
} 
0

試試這個代碼

protected void Calendar1_DayRender(object sender, DayRenderEventArgs e) 
    { 
     if (e.Day.Date < DateTime.Now) 
     { 
      e.Day.IsSelectable = false; 
      e.Cell.Enabled=false; 
     } 

    } 
相關問題