Opened 11 years ago

Closed 4 years ago

#7985 closed enhancement (patchwelcome)

DateTextBox: Option to display adjacent months

Reported by: David Schwartz Owned by: dante
Priority: high Milestone: 1.11
Component: DojoX Form Version: 1.2.0
Keywords: ibm date two-month Cc:
Blocked By: Blocking:

Description

There's insufficient flexibility in the widget to support different types of tasks, e.g., selecting a date over the course of the next few weeks. This implies the concurrent display of adjacent months which the widget doesn't currently support.



Note that year is shown to address when on the cusp of a new year. The current year corresponds to December.

(The various other features depicted will be described in other tickets.)

Attachments (2)

two-month-display.gif (15.6 KB) - added by David Schwartz 11 years ago.
compound.patch (10.2 KB) - added by Adam Peller 10 years ago.
needs a little work, but you get the idea. Also, #6570 might help with the year representation.

Download all attachments as: .zip

Change History (13)

Changed 11 years ago by David Schwartz

Attachment: two-month-display.gif added

comment:1 Changed 11 years ago by Adam Peller

I'm not sure I understand the need for this unless a range is being specified (see #6493). I'd prefer to see this as a mixin, possibly in dojox

comment:2 Changed 11 years ago by David Schwartz

One common task where a two-month form is used is the specification of flight dates on travel sites where most scheduled trips are within the next two months like

http://www.travelocity.com/?WA1=01010&WA2=MSN&WA3=site%3Awww.travelocity.com+travelocity&WA4=E&WA5=BT&WA8=29529793_76.104.162.147%3A1225291830185 and

http://www.expedia.com/daily/home/?semcid=13172-1&eapid=13172-1&kword=travel%20reservations.

comment:3 Changed 11 years ago by Adam Peller

Sounds like a specialized use case, and one where I often see ranges (at least some travel sites just let you pick a day on the second calendar, too)

These are all things I'd like to make possible, either by example, mixin/extension, but baking it into dijit does not sound like the right approach.

comment:4 Changed 11 years ago by David Schwartz

So, what's the process? Is it then in a holding pattern until someone picks it up as part of dojox?

comment:5 Changed 11 years ago by Adam Peller

Someone's gotta pick it up either way. Where the code gets checked in is just administrative, really.

comment:6 Changed 11 years ago by bill

Component: Dijit - LnFDijit
Milestone: tbdfuture
Type: defecttask

I'd like to see the implemented somewhere too, as it something I commonly see on sites. But marking as "future" until we get a volunteer to implement it.

comment:7 Changed 10 years ago by thekryz

I second this request. This is the only reason in our company that we're still using yui alongside the Dojo Toolkit. Our users are just too lazy to click - they want to choose over at least a couple of months. I don't think that this is such an unusual request.

comment:8 Changed 10 years ago by Adam Peller

A simple implementation might just be a compound widget which instantiates 2 (or optionally 3?) dijit.Calendars around the specified value, hides the inner next/previous month and year nodes, then wires the selection events together such that the calendars scroll together and have the same selection. To do that, we'd probably have to either refactor the APIs a tiny bit or cheat and reference private properties.

Changed 10 years ago by Adam Peller

Attachment: compound.patch added

needs a little work, but you get the idea. Also, #6570 might help with the year representation.

comment:9 Changed 8 years ago by Chris Mitchell

Type: taskenhancement

comment:10 Changed 8 years ago by bill

Component: DijitDojoX Form
Owner: set to dante

comment:11 Changed 4 years ago by dylan

Milestone: future1.11
Resolution: patchwelcome
Status: newclosed

I think this is possible with the widgets in DojoX.

That said, given the lack of interest over the past 7 years, I'm closing it as patchwelcome. If there's interest in revisiting this please re-open with a pull request per our contribution guidelines ( https://github.com/dojo/dojo/blob/master/CONTRIBUTING.md ).

Note: See TracTickets for help on using tickets.