ZetDateField

From Openzet

Jump to: navigation, search

Contents

Introduction

ZetDateField is a custom component that includes controls to display dates, hours, and a range of dates, such as startDate and endDate. 

Image:ZetDateField3.jpg

Property

<zet:ZetDateField showStartDate="true" showEndDate="true" />
Image:ZetDateField2.jpg

The properties above are to specify the visibility of DateFields representing start date and end date. Default values for all these properties are true. If you, for example, want to show start date only, you can do so by setting showEndDate property's value to false.

<zet:ZetDateField showStartDate="true" showEndDate="false" showTime="true" />
Image:ZetDateField5.jpg

The listing above shows how to add  TimeStepper to show time. This TimeStpper also can be either visible or invisible by the values of showStartDate and/or showEndDate, respectively.

<zet:ZetDateField showMonthField="true" showTime="true" />
Image:ZetDateField4.jpg

Ths listing above shows how to use MonthDateField to display year and month.

Usage 

<zet:ZetDateField id="zetDateField"/>
 Basically ZetDateField has two DateField instances to show start date and end date. Yet you can customize the way to show dates by specifying property values this control provides. Also you can easily set the visibility of each control. In addition, you can use selectableRange property to set only a range of dates that as selectable. Lastly, you can use formatString property to have resulting date string follow certain format string pattern. 

Application Example

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:zet="org.openzet.controls.*"
layout="vertical">
<mx:Panel title="ZetDateField">
<zet:ZetDateField id="d2d"
formatString="YYYYMMDD"
showTime="true"
showStartDate="true"
showEndDate="true"
horizontalGap="5"
selectableRange="3day"/>
</mx:Panel>
</mx:Application>
 
Personal tools
Participation
Silverlight