bootstrap的日期控件如何改成24小时制

bootstrap的日期控件如何改成24小时制bootstrap的日期控件如何改成24小时制bootstrap的日期控件如何改成24小时制

2个回答

dateTimePicker1.Format = DateTimePickerFormat.Custom;
dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss";//HH是24小时,hh是12小时

http://www.bootcss.com/p/bootstrap-datetimepicker/

 format

String. 默认值: 'mm/dd/yyyy'

日期格式, p, P, h, hh, i, ii, s, ss, d, dd, m, mm, M, MM, yy, yyyy 的任意组合。

    p : meridian in lower case ('am' or 'pm') - according to locale file
    P : meridian in upper case ('AM' or 'PM') - according to locale file
    s : seconds without leading zeros
    ss : seconds, 2 digits with leading zeros
    i : minutes without leading zeros
    ii : minutes, 2 digits with leading zeros
    h : hour without leading zeros - 24-hour format
    hh : hour, 2 digits with leading zeros - 24-hour format
    H : hour without leading zeros - 12-hour format
    HH : hour, 2 digits with leading zeros - 12-hour format
    d : day of the month without leading zeros
    dd : day of the month, 2 digits with leading zeros
    m : numeric representation of month without leading zeros
    mm : numeric representation of the month, 2 digits with leading zeros
    M : short textual representation of a month, three letters
    MM : full textual representation of a month, such as January or March
    yy : two digit representation of a year
    yyyy : full numeric representation of a year, 4 digits

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐