开发者

jQuery UI Datepicker : How to select multiple non-contiguous dates?

I want to show 3 months calendar at a time, where user can select days in following orderly manner :

  1. user would select number of days to be selected via a dropdown somewhere, let's say it's n
  2. then user would select particular days to be selected in every week (eg only Monday, Thursday and Saturdays are to be selected each week) via 7 checkboxes
  3. then user would select first random date on calendar
  4. then clicking 'assign' button would 'select' all 'n' days in calendar following rule 2. And list of all these days would be printed开发者_StackOverflow中文版 in a textarea.

Is it possible to do this using jQuery UI calendar? How can I do this?

Currently I'm using noGray calendar but because of several reasons I want to switch.

Thanks.


The control can sort of do what you want. However, I had a similar issue. I wanted to deactivate bank holidays and non-business days. Unfortunately, the plugin just doesn't support this functionality out of the box. For me, I'm just living with that limitation unless it becomes a problem (it wasn't mission critical).

Steps 1-2 are easy enough.

Step 3, you will need to use an onSelect function to validate the user's choice. Every date, however, will show as selectable.

Step 4, probably same logic as you are currently using.

The easiest way to enforce the dates in the control is probably to write your own extension to the jquery.ui library for the datepicker or just modify the stock plugin. And that is why I went with what is acceptable over what is desired.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜