Ticket #6297 (closed enhancement: fixed)

Opened 8 months ago

Last modified 7 months ago

Add a new Calendar widget to DojoX

Reported by: sos Owned by: nathan
Priority: normal Milestone: 1.2
Component: Dojox Version: 1.0
Severity: normal Keywords:
Cc: dante

Description

See attached patch for a new Calendar widget.

Attachments

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

Change History

Changed 8 months ago by sos

Updated patch with Fisheye support

Changed 8 months ago by peller

  • milestone changed from 1.1 to 1.2

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

Changed 8 months 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 8 months ago by sos

Additional support for month-only and year-only views

Changed 8 months ago by sos

  • type changed from defect to enhancement

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

Changed 8 months ago by nathan

  • cc dante added
  • owner changed from dante to nathan
  • status changed from new to assigned

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 8 months ago by nathan

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

Changed 8 months 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?.

Changed 8 months ago by 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.

Changed 8 months 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

Changed 8 months 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.

Changed 8 months ago by nathan

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in [13302]

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

Changed 8 months ago by 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.

Changed 7 months 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.