江湖救急 DateTimePicker 下拉选择时,只显示上面的月份,不显示下面日期

解决方案 »

  1.   

    你可以怎么处理!
    放好DateTimePicker,设置好它的Format,然后把宽度调整到只能显示年月即可!
      

  2.   

    把DateTimePicker 隐藏 自己做一个UpDown1和edit绑定,或者里listbox
    然后把值赋给DateTimePicker 在做你的操作
      

  3.   

    DateTimePicker1.Format := 'yyyy年MM月';
      

  4.   

    那么干脆就不要把DateMode设置成ComboBox,设置成UpDown好了!
      

  5.   

    DateTimePicker1.Format := 'MM';
      

  6.   

    Element Description  
    d The one- or two-digit day. 
    dd The two-digit day. Single-digit day values are preceded by a zero. 
    ddd The three-character weekday abbreviation. 
    dddd The full weekday name. 
    h The one- or two-digit hour in 12-hour format. 
    hh The two-digit hour in 12-hour format. Single-digit values are preceded by a zero. 
    H The one- or two-digit hour in 24-hour format. 
    HH The two-digit hour in 24-hour format. Single-digit values are preceded by a zero. m The one- or two-digit minute. 
    mm The two-digit minute. Single-digit values are preceded by a zero. 
    M The one- or two-digit month number. 
    MM The two-digit month number. Single-digit values are preceded by a zero. 
    MMM The three-character month abbreviation. 
    MMMM The full month name. 
    t The one-letter AM/PM abbreviation (that is, AM is displayed as "A"). 
    tt The two-letter AM/PM abbreviation (that is, AM is displayed as "AM"). 
    yy The last two digits of the year (that is, 2001 would be displayed as "01"). yyyy The full year (that is, 2001 would be displayed as "2001").
      

  7.   

    DateMode设置成dmUpDownFormat 写成 yyyy年MM月
      

  8.   

    我这里有,你可以吧email贴出来,我回头发给你。
      

  9.   

    用Format可以,不过可能不是你想要的样子