Name

datepicker — A simple date picker

Synopsis

LZX: datepicker
JavaScript: datepicker
Type: Class
Access: public
Topic: Components.Laszlo Components
Declared in: lps/components/lz/datepicker.lzx

Description

Datepicker is a simple component that makes it easy for users to select dates.

 
              <canvas height="200"> 
              <datepicker showingdate="new Date(2006,3,1)"
              earliestdate="new Date( 2003, 9, 5)" 
              latestdate="new Date( 2005, 1, 5)"
              selecteddate="new Date( 2006, 3, 20)">
              <handler name="onselecteddate">
              if( this.selecteddate != null ) {
              display.year.setText( this.selecteddate.getFullYear() );
              display.month.datapath.setXPath(
              "datepicker_strings_en:/months/month[@index='" + 
              this.selecteddate.getMonth() + "']/@full" ); 
              display.date.setText( this.selecteddate.getDate() );
              } 
              </handler>
              </datepicker> 

              <view id="display">
              <text name="month" resize="true" datapath="."/>
              <text name="date" resize="true"/>
              <text name="year" resize="true"/> 
              <simplelayout axis="x" spacing="2"/>
              </view>
              <simplelayout axis="y" spacing="10"/>
              </canvas>
            
This is the Laszlo implementation datepicker class.

Superclass Chain

node (LzNode) » view (LzView) » basecomponent » basedatepicker » datepicker

Known Subclasses

Details

Properties (2)

allowdrag
<attribute name="allowdrag" type="boolean" value="true" />
public var allowdrag : Boolean;
startAsIcon
<attribute name="startAsIcon" type="boolean" value="true" />
public var startAsIcon : Boolean;
Set to true to initially show the datepicker as an icon, otherwise set to false.

Methods (7)

doEnterUp()
<method name="doEnterUp" />
public function doEnterUp();
doSpaceUp()
<method name="doSpaceUp" />
public function doSpaceUp();
expandFromIcon()
<method name="expandFromIcon" />
public function expandFromIcon();
handleSelected()
<method name="handleSelected" />
public function handleSelected();
init()
<method name="init" />
public function init();
setMonthToShow()
<method name="setMonthToShow" args="month, year" />
protected function setMonthToShow(month, year);
Set the month to show in the basedatepicker.
shrinkToIcon()
<method name="shrinkToIcon" />
public function shrinkToIcon();

LZX Synopsis

<class name="datepicker" extends=" basedatepicker ">
  <attribute name=" allowdrag " type="boolean" value="true" />
  <attribute name=" startAsIcon " type="boolean" value="true" />
  <method name=" doEnterUp " />
  <method name=" doSpaceUp " />
  <method name=" expandFromIcon " />
  <method name=" handleSelected " />
  <method name=" init " />
  <method name=" setMonthToShow " args="month, year" />
  <method name=" shrinkToIcon " />
</class>

JavaScript Synopsis

public datepicker extends  basedatepicker  {
  public var allowdrag  : Boolean;
  public var startAsIcon  : Boolean;
  prototype public function doEnterUp ();
  prototype public function doSpaceUp ();
  prototype public function expandFromIcon ();
  prototype public function handleSelected ();
  prototype public function init ();
  prototype protected function setMonthToShow (month, year);
  prototype public function shrinkToIcon ();
}