ComponentOne True DBInput Pro 8.0
Features of the TDBDate Control

This section describes the following TDBDate control features:

Flexible Formatting

The TDBDate control has the most commonly used date format styles pre-defined in the property page, allowing for quick design. Additionally, the display format is separated from the input format, making it possible to display dates in complex format with easier input.

For example, to display Mar 29 ’97, and yet have the user key only 032997, set the DisplayFormat property to mmm/dd/’yy and the Format property to mm/dd/yy. Combining the use of DisplayFormat with Format reduces keystrokes.

Data Binding Feature

The data bound functionality, which is supported by Visual Basic, is now also supported by the TDBDate control. With data binding, a date value can be retrieved from any field in the database and displayed in the control, or entered date values can be stored into the database.

Automatic Character Filtering

TDBDate reduces coding time with automatic character filtering for allowable characters (that is, periods, commas, and letters), and date validation. The TDBDate date validation feature processes years such as leap years correctly so you can eliminate date checking within your code. Date input errors such as non-existing dates (4/31 or 6/31) or leap year dates will be handled correctly by the control, thus reducing coding time.

DropDown Calendar

The dropdown calendar provides for easy entry of dates at run time, particularly if the user is trying to enter a time marker as opposed to a date. For example, a user may want to enter the date for three weeks from today, or for last Wednesday. In either case, the drop down calendar will allow the user to select the date without checking an alternate source. The user can access the drop down calendar by clicking the down arrow button set using the DropDown object, or by pressing a key defined in the Key object’s property as an action key. To use the calendar, the user may select a date either by using the arrow keys to highlight the date and pressing the ENTER key or by single clicking on the desired date. You can also customize the drop down calendar in detail such as the color display, accessing through the Calendar object.

Day Number

The TDBDate control can determine the day of the year of a given date (Feb. 22 = 53) by setting the DayOfYear property, or setting the Day property to return the day value for a date (53 = Feb. 22). TDBDate also features the WeekDay property for returning the day of week for a date and the WeekOfYear property, for returning the week of year of a date.

Fiscal Properties

Similar to the Day property, the FirstMonth property sets or returns the first month for fiscal year, FiscalQuarter returns the fiscal quarter for the year, and FiscalYear returns the fiscal year.

Action Keys

TDBDate provides action keys to contribute to a more efficient design and run time.  You can customize navigation by setting the properties in the Key object. The Now property in the Key object can define a key for the user to enter the current system date, and the DropDown property can define a key to drop down the Calendar object.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback