Opened 8 years ago

Closed 8 years ago

#14276 closed task (fixed)

[patch][cla] Creating custom calendar need to override many methods

Reported by: Mathevet julien Owned by: bill
Priority: high Milestone: 1.8
Component: Dijit Version: 1.7.0
Keywords: CalendarLite Calendar Custom Widget Cc:
Blocked By: Blocking:

Description

Hi,

I would like to create a custom calendar without year (previous, current and next) control. But with CalendarLite, I have to override buildrendering and populateGrid juste to remove 2 lines on each. There is also a main problem, it's buildrendering call inherits.

I add example and patch. Patch is just to show main idea of extracting methods of grid and amin with, with control.

Attachments (4)

test_CalendarCustom.html (3.8 KB) - added by Mathevet julien 8 years ago.
_altCustomCalendar.html (1.2 KB) - added by Mathevet julien 8 years ago.
patchEasyCustomCalendar.patch (1.9 KB) - added by Mathevet julien 8 years ago.
patchMoveMonthWidgetUpdate.diff (2.0 KB) - added by Mathevet julien 8 years ago.

Download all attachments as: .zip

Change History (9)

Changed 8 years ago by Mathevet julien

Attachment: test_CalendarCustom.html added

Changed 8 years ago by Mathevet julien

Attachment: _altCustomCalendar.html added

Changed 8 years ago by Mathevet julien

comment:1 Changed 8 years ago by bill

Milestone: 1.8
Owner: set to bill
Status: newassigned
Type: defecttask

OK thanks, I'll check in a modified version of your patch, where:

  • _populateGrid() doesn't call _populateControls() since the controls are not part of the grid
  • Also taking the opportunity to move the connects() from buildRendering() to postCreate(), since that's what postCreate() is for. (The exception is _TemplatedMixin.buildRendering(), which does the connects specified in the template.)

comment:2 Changed 8 years ago by bill

Resolution: fixed
Status: assignedclosed

In [27049]:

Split out population of grid and controls, for easier extensibility, fixes #14276 !strict. Also moving connect() calls from buildRendering() to postCreate().

comment:3 Changed 8 years ago by Mathevet julien

Could be better to move also Month widget update

Changed 8 years ago by Mathevet julien

comment:4 Changed 8 years ago by Mathevet julien

Resolution: fixed
Status: closedreopened

comment:5 Changed 8 years ago by bill

Resolution: fixed
Status: reopenedclosed

In [27242]:

Update month widget in _populateControls() rather than _populateGrid(), thanks moogle, fixes #14276 !strict.

Note: See TracTickets for help on using tickets.