我想在日历控件显示星期几的位置,显示“日、一、二、三、四、五、六”。而不是“星期日、星期一...”。请问怎么实现?谢谢!!!

解决方案 »

  1.   

    DayNameFormat="FirstLetter"
    也就是DayNameFormat的属性设置一下
      

  2.   

    你在</body>后面加上这一段JAVASCRIPT代码试试看。
    function load_init() {
     document.all.Calendar1.rows(1).cells(0).innerText="日"; 
     document.all.Calendar1.rows(1).cells(1).innerText="一"; 
     document.all.Calendar1.rows(1).cells(2).innerText="二"; 
     document.all.Calendar1.rows(1).cells(3).innerText="三";
     document.all.Calendar1.rows(1).cells(4).innerText="四"; 
     document.all.Calendar1.rows(1).cells(5).innerText="五"; 
     document.all.Calendar1.rows(1).cells(6).innerText="六"; 
    } load_init();注:Calendar1是控件的名称
      

  3.   

    谢谢  adminyao(程序傻子)!你的方法确实管用。但是有没有其它方法可以在后台程序中搞定呢?比如在数据绑定的时候做这件事。我再看看有没有更好的方法。
      

  4.   

    Imports System.Threading
    Imports System.Globalization    Private arrCurrentDays, arrPreDays, arrNextDays As Integer()  '  //三个变量分别是当前月,前一月,和下一个月
        Private intCurrentMonth, intPreMonth, intNextMonth As Integer ' //三个整型数组存放相对月份写有blog的日期    Private Sub Calendar1_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Calendar1.PreRender
            Dim threadCurrent As Thread = Thread.CurrentThread
            Dim ciNew As CultureInfo = CType(threadCurrent.CurrentCulture.Clone(), CultureInfo)
            ciNew.DateTimeFormat.DayNames = New String() {"日", "一", "二", "三", "四", "五", "六"}
            ciNew.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Sunday
            threadCurrent.CurrentCulture = ciNew
        End Sub
      

  5.   

    http://myx.name/default.aspx?page=7演示
    http://myx.name/mytest/BlogTime.aspx
      

  6.   

    谢谢 myexam(exam),问题解决了。
      

  7.   

    Thread threadCurrent = Thread.CurrentThread;
    CultureInfo ciNew = (CultureInfo)threadCurrent.CurrentCulture.Clone();
    ciNew.DateTimeFormat.DayNames = new string[]{"日", "一", "二", "三", "四", "五", "六"};
    ciNew.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Monday;
    threadCurrent.CurrentCulture = ciNew;C#版的,呵呵……牛人啊!!!