Class zebkit.ui.date.Calendar
extends <zebkit.ui.Panel>
<zebkit.ui.date>

Calendar component. This component is supposed to be used to select a single date with the help of provided UI.

 var c = new zebkit.ui.date.Calendar();
 var z = new zebkit.ui.zCanvas();
 z.root.setFlowLayout();
 z.root.add(c);
Constructor:
zebkit.ui.date.Calendar ([date])

Parameters:
  • [date] <Date>

    a date to be set




Inherited methods:
$setConstraints(c)    add(constr, d)    byConstraints([p], c)    byPath(path, [cb])    calcPreferredSize(target)    doLayout( )    fire(name, [path], [params])    focused( )    getBottom( )    getCanvas( )    getComponentAt(x, y)    getHorPadding( )    getLeft( )    getPreferredSize( )    getRight( )    getTop( )    getVerPadding( )    hasFocus( )    indexOf(c)    insert(i, constr, d)    invalidate( )    invalidateLayout( )    kidAdded(index, constr, l)    kidRemoved(i, l)    laidout( )    load(JSON)    off([eventName], [path], [cb])    on([eventName], [path], cb)    paintComponent(g)    paintViewAt(g, ax, ay, v)    properties([path], props)    property([path], name, value)    recalc( )    relocated(px, py)    remove(c)    removeAll( )    removeAt(i)    removeByConstraints(ctr)    removeMe([after])    repaint([x], [y], [w], [h])    replaceMe([ctr], c)    requestFocus( )    requestFocusIn([timeout])    resized(pw, ph)    setAt(i, d)    setBackground(v)    setBorder([v])    setBorderLayout([gap])    setBottomPadding(bottom)    setBounds(x, y, w, h)    setByConstraints(constr, c)    setConstraints(ctr)    setEnabled(b)    setFlowLayout([ax], [ay], [dir], [gap])    setId(id)    setKids(a)    setLayout(m)    setLeftPadding(left)    setListLayout([ax], [gap])    setLocation(xx, yy)    setPadding(v)    setParent(o)    setPreferredSize(w, h)    setProperties([path], props)    setRasterLayout([usePsSize])    setRightPadding(right)    setSize(w, h)    setStackLayout([gap])    setTopPadding(top)    setVisible(b)    toBack( )    toFront( )    toPreferredHeight( )    toPreferredSize( )    toPreferredWidth( )    toView(target)    validate( )    validateMetric( )    vrp( )   


protected void dateSelected (date, b)

Method that is called every time a new date has been selected


Parameters:
  • date <Date>

    a date that has been selected

  • b <Boolean>

    indicates if the date has been selected or de-selected

public <Date> getValue ( )

Get a selected date.


Returns: <Date>

a selected date

public chainable setDateRange (minDate, maxDate)

Set the date range. Date selection is possible only withing the range.


Parameters:
  • minDate <Object>

    a minimal possible date.

  • maxDate <Object>

    a maximal possible date.

public chainable setMaxDate (mazDate)

Set maximal possible date


Parameters:
  • mazDate <Object>

    a maximal possible date.

public chainable setMinDate (minDate)

Set minimal possible date


Parameters:
  • minDate <Object>

    a minimal possible date.

public <Date> setValue ( )

Set the given date as selected.


Returns: <Date>

date a date to be selected



Inherited attributes:
public zebkit.draw.View bg    public zebkit.draw.View border    public Boolean canHaveFocus    public Object constraints    public Integer height    public Boolean isEnabled    public Boolean isValid    public Boolean isVisible    public Array kids    public zebkit.layout.Layout layout    public zebkit.layout.Layoutable parent    public Integer width    public Integer x    public Integer y   



public <zebkit.ui.date.Calendar.Combo> comboMonth

Combo box component to show list of months.

public <zebkit.ui.date.MonthDaysGrid> monthDays

Month days

public <zebkit.ui.date.Calendar.YearField> yearField

Year selection field.




dateSelected

Fire when the date has been selected or de-selected.

  calendar.on("dateSelected", function(src, date, b) {
      ...
  });

Parameters: