cubicweb.calendar.js — CubicWeb 3.10.1

### Navigation

- index
- modules |
- next |
- previous |
- CubicWeb 3.10.1 »
- Web side development »
- Javascript »
- <no title> »

# cubicweb.calendar.js

This file contains Calendar utilities

  organization: | Logilab
  copyright: | 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
  contact: | http://www.logilab.fr/ – mailto:contact@logilab.fr

class `cubicweb.calendar.js.` `Calendar`

Calendar (graphical) widget public methods are :

> __init__ :
>   @param containerId: the DOM node’s ID where the calendar will be displayed @param inputId: which input needs to be updated when a date is selected @param year, @param month: year and month to be displayed @param cssclass: CSS class of the calendar widget (default is commandCal)
> show() / hide():
>   show or hide the calendar widget
> toggle():
>   show (resp. hide) the calendar if it’s hidden (resp. displayed)
> displayNextMonth(): (resp. displayPreviousMonth())
>   update the calendar to display next (resp. previous) month

`Calendar.` `_uppercaseFirst`(s)

utility function (the only use for now is inside the calendar)

`Calendar.` `_domForRows`(rows)

accepts the cells data and builds the corresponding TR nodes

- rows, a list of list of couples (daynum, cssprops)

`Calendar.` `_headdisplay`(row)

builds the calendar headers

`cubicweb.calendar.js.` `toggleCalendar`(containerId, inputId, year, month)

popup / hide calendar associated to containerId

`cubicweb.calendar.js.` `toggleNextMonth`(containerId)

ask for next month to calendar displayed in containerId

`cubicweb.calendar.js.` `togglePreviousMonth`(containerId)

ask for previous month to calendar displayed in containerId

`cubicweb.calendar.js.` `dateSelected`(cell, containerId)

Callback called when the user clicked on a cell in the popup calendar

### Navigation

- index
- modules |
- next |
- previous |
- CubicWeb 3.10.1 »
- Web side development »
- Javascript »
- <no title> »