Skip to main content

Search and Top Navigation

#7479 closed enhancement (wontfix)

Opened June 15, 2011 09:37PM UTC

Closed June 15, 2011 09:55PM UTC

Last modified June 16, 2011 01:23PM UTC

datepicker: support for Broadcast Calendar

Reported by: brightgarden Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.datepicker Version: 1.8.13
Keywords: Cc:
Blocked by: Blocking:
Description

This is not a bug. I have a change, which I will attempt to commit. The gist is this: I need a broadcast calendar. See: http://en.wikipedia.org/wiki/Broadcast_calendar

It's pretty simple, and the datepicker does almost everything I need out of the box. I just have two main issues:

1. I need to suppress rendering the last week if it includes days from the next month.

1. If the selected date is not in the current month (i.e., August 31, 2011 is actually in "September" on the broadcast calendar), then it should initially open on the correct month.

I'll commit my modification, but of course, if there's a better way, I would love to hear it/use it.

Attachments (0)
Change History (5)

Changed June 15, 2011 09:55PM UTC by scottgonzalez comment:1

resolution: → wontfix
status: newclosed

This shouldn't be part of the datepicker, but should be possible to build on top of the datepicker. This likely won't be easy until the rewrite. I've left a comment on the planning wiki to make sure we cover this use case during the rewrite.

Changed June 15, 2011 10:06PM UTC by brightgarden comment:2

ok. that's fine. can't wait for the rewrite. I won't submit the pull request.

https://github.com/brightgarden/jquery-ui/blob/00851c3ab9631af2ac5a8c5fa6ad2d1c4dafb4fc/ui/jquery.ui.datepicker.js

Changed June 15, 2011 10:10PM UTC by brightgarden comment:3

Replying to [comment:1 scott.gonzalez]:

This shouldn't be part of the datepicker, but should be possible to build on top of the datepicker. This likely won't be easy until the rewrite. I've left a comment on the planning wiki to make sure we cover this use case during the rewrite.

Thanks. I saw the comment on the wiki. And I do think the globalization plugin is a good way to look (I modified the regional settings in my edit).

I can do a hacky extend to make my calendar work, but it still requires a couple of key lines to be inserted to properly calculate the number of rows to display.

Our project stays on top of the latest plugins, so I was hoping to submit a fix so that my modification didn't have to be re-done with each new update.

  • Maggie

Changed June 16, 2011 12:49AM UTC by scottgonzalez comment:4

Maggie: If there's a simple refactoring of one or two methods in the existing code that would make it possible for you to build your extension in a clean way, I wouldn't be against landing that now. I just don't want to be adding features or making large changes.

Changed June 16, 2011 01:23PM UTC by brightgarden comment:5

Replying to [comment:4 scott.gonzalez]:

Maggie: If there's a simple refactoring of one or two methods in the existing code that would make it possible for you to build your extension in a clean way, I wouldn't be against landing that now. I just don't want to be adding features or making large changes.

Ah, actually there is. The bare minimum I need is a way to allow the number of rows to be one less. I implemented it using a new option "showTrailingWeek"--a name I am not in love with.

If you look at my commit, it would be 3 lines: 59, 1483, 1523.

https://github.com/brightgarden/jquery-ui/commit/00851c3ab9631af2ac5a8c5fa6ad2d1c4dafb4fc

I can definitely do an hacky extend to do the rest. I tried to extend generateHtml, and I can still try, but it would be gross and disgusting. Let me know what you think.

Thanks for replying.