最简单的日历控件“星期几”变为“几”

原来真的很简单。

 1 private   void  WebCalendar_PreRender( object  sender, System.EventArgs e)
 2 {
 3    Thread threadCurrent = Thread.CurrentThread; 
 4    CultureInfo ciNew = (CultureInfo)threadCurrent.CurrentCulture.Clone(); 
 5    if(ciNew.LCID == 2052)
 6    {
 7        ciNew.DateTimeFormat.DayNames = new string[]{"","","","","","",""}
 8        ciNew.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Sunday;
 9        threadCurrent.CurrentCulture = ciNew;
10    }

11}

你可能感兴趣的:(日历控件)