Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#6297 closed enhancement (fixed)

Add a new Calendar widget to DojoX

Reported by: sos Owned by: nathan
Priority: high Milestone: 1.2
Component: Dojox Version: 1.0
Keywords: Cc: dante
Blocked By: Blocking:

Description

See attached patch for a new Calendar widget.

Attachments (3)

Calendar.patch (18.3 KB) - added by sos 11 years ago.
Updated patch with Fisheye support
Calendar2.patch (27.6 KB) - added by sos 11 years ago.
Additional support for month-only and year-only views
test_Calendar.html (2.5 KB) - added by nathan 11 years ago.
test_Calendar.html - missing from patch, snagged directly from http://www.skynet.ie/~sos/js/demo/dojo/dojox/widget/tests/test_Calendar.html

Download all attachments as: .zip

Change History (14)

Changed 11 years ago by sos

Attachment: Calendar.patch added

Updated patch with Fisheye support

comment:1 Changed 11 years ago by Adam Peller

Milestone: 1.11.2

interesting approach... I'm also wondering if a dropdown for year/month. People have asked for this.

comment:2 Changed 11 years ago by sos

Hmm, good idea. We could make it optional as to which of the screens was available, so you could just show the months, or just the years etc.

Changed 11 years ago by sos

Attachment: Calendar2.patch added

Additional support for month-only and year-only views

comment:3 Changed 11 years ago by sos

Type: defectenhancement

I've added support for the widget to work as a month or year view, with additional support in the dropdown widget.

comment:4 Changed 11 years ago by nathan

Cc: dante added
Owner: changed from dante to nathan
Status: newassigned

This looks really good! A couple of things before I commit:

1 - have you signed the CLA?

2 - there are a couple issues I encountered:

  • the dojox.form.tests.test_DateTextBox.html doesn't work in safari - the fisheye effect doesn't happen, and when you slide in the month or year view, it gets messed up
  • I can't get either test_Calendar.html or test_DateTextBox.html to load in IE.

Changed 11 years ago by nathan

Attachment: test_Calendar.html added

test_Calendar.html - missing from patch, snagged directly from http://www.skynet.ie/~sos/js/demo/dojo/dojox/widget/tests/test_Calendar.html

comment:5 Changed 11 years ago by nathan

one other (minor) issue:

When loading test_Calendar.html in safari, the debug box is on top of the calendar items. It's not a big problem, and I'd commit with that behavior - but I'm thinking it might be something related to the positioning or styling that breaks DateTextBox?.

comment:6 Changed 11 years ago by Adam Peller

Pretty sure we have a new CLA from Shane.

I had a few concerns about how we structure this widget. I'd much rather see it set up as a palette of mixins to the minimalist dijit._Calendar, even if it means refactoring _Calendar some.

Also, I'd really love to see popups for month/year as a mixin/enhancement. It's often requested.

comment:7 Changed 11 years ago by sos

Hi,

Yes, I've submitted a CLA under Curam Software a year or so ago.

I'll look into the issue with Safari, I'd only tested on IE and FF2. Strange that you had problems with IE, it worked fine for me. What version are you using? OS?

I'll see what can be done about the debug box in Safari. I'll change the test page to put other elements on the page to make sure it plays well with others.

I like the idea of mixins, but that would be a more long term goal, i.e. for 1.2. How about I fix up the issues above, get it checked in and get some feedback from the community. Then I can work on the mixin idea, as changing Dijit._Calendar is a bigger deal.

Thanks

Shane

comment:8 Changed 11 years ago by nathan

I'll actually check in what we have here for now, and file separate issues for the Safari and IE issues. Since it's dojox, I think that we'll be fine to have it not fully cross-browser - but we need to make sure it works in the three by 1.2.

The mixins, I agree, can be a longer-term goal.

comment:9 Changed 11 years ago by nathan

Resolution: fixed
Status: assignedclosed

Fixed in [13302]

Also, I found the error that was causing breakage in IE (an extra comma and an extra semicolon)

comment:10 Changed 11 years ago by Adam Peller

I think the mixins should really be a short-term goal, otherwise it's a recipe for a bloated widget, and we're only guessing at what the user wants. I don't know what impact this will have on dijit._Calendar. It might not be so bad.

comment:11 Changed 11 years ago by sos

Agreed re: refactoring it into mixins. It'll make developing much easier in the future, and also enable users to mixin their own behaviors.

I've submitted the patch in a new ticket, http://trac.dojotoolkit.org/ticket/6528

Note: See TracTickets for help on using tickets.