jQuery UI Datepicker - allow only certain weekdays

后端 未结 5 545
我在风中等你
我在风中等你 2020-12-17 21:56

I\'m using jquery UI datepicker on a huge project and I realize now that I\'ll need to allow only certain weekdays on some areas. I read their documentation and didn\'t find

5条回答
  •  猫巷女王i
    2020-12-17 22:17

    From the docs:

    beforeShowDay: The function takes a date as a parameter and must return an array with [0] equal to true/false indicating whether or not this date is selectable, [1] equal to a CSS class name(s) or '' for the default presentation, and [2] an optional popup tooltip for this date. It is called for each day in the datepicker before it is displayed.

    For an example, please see here:

    http://codeasp.net/blogs/raghav_khunger/microsoft-net/1088/jquery-datepicker-disable-specific-weekdays

提交回复
热议问题