dontide
dontide
2009-08-17 10:41
浏览 309

Ext 时间控件

我有这样一个需求,就是报表类型分为日报和周报,现在我想解决的是一个周报的问题,因为周报的时间为一整周一整周的,所以在想在datefield时间控件内设置格式为只能选择周,如
[img]
[url]http://www.iteye.com/upload/attachment/136722/ff6daf1b-ef38-3cb8-af14-e1a8ad54f5ef.jpg[/url]
[/img]

我想打开这个控件后就只有最左边的周日和最后边的周六能够选择,其余的都处于不可选状态,就是灰色的。有没有这种解决方案,希望大家提出意见,谢谢。我没有提问的分了,不能追加了,望大家多包涵。

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

3条回答 默认 最新

  • zhoujuan520
    zhoujuan520 2009-08-17 11:17
    已采纳

    disabledDays : Array

    An array of days to disable, 0 based (defaults to null). Some examples:

    // disable Sunday and Saturday:
    disabledDays: [0, 6]
    // disable weekdays:
    disabledDays: [1,2,3,4,5]


    disabledDates : Array

    An array of "dates" to disable, as strings. These strings will be used to build a dynamic regular expression so they are very powerful. Some examples:

    // disable these exact dates:
    disabledDates: ["03/08/2003", "09/16/2003"]
    // disable these days for every year:
    disabledDates: ["03/08", "09/16"]
    // only match the beginning (useful if you are using short years):
    disabledDates: ["^03/08"]
    // disable every day in March 2006:
    disabledDates: ["03/../2006"]
    // disable every day in every March:
    disabledDates: ["^03"]

    点赞 评论
  • zhoujuan520
    zhoujuan520 2009-08-17 11:14

    ext的日期选择空间已经支持了。仔细去研究它的api吧

    点赞 评论
  • zhoujuan520
    zhoujuan520 2009-08-17 11:17

    不好意思,我就不翻译了。从字面都很好理解了

    点赞 评论

相关推荐