Class

# DBKit.DatePicker

<div class="rst-class">

forsearch

</div>

DBKit.DatePicker

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

Displays and edits the value of a single database column for the current row.

Set `ColumnName<dbkit.datepicker.columnname>` to the column you want the control bound to. The user can change the value by typing a date or selecting one from the drop-down calendar.

Only the members declared by <span class="title-ref">DBKit.DatePicker</span> itself are described here; for the inherited members, see `the parent class<dbkit.datepicker.seealso>`.

<div class="note">

<div class="title">

Note

</div>

DBKit.DatePicker is web only. On desktop, use `DBKit.DateTimePicker</api/databases/dbkit/datetimepicker>` instead.

</div>

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                                        | Type                               | Read-Only | Shared |
|-------------------------------------------------------------|------------------------------------|-----------|--------|
| `ColumnName<dbkit.datepicker.columnname>`                   | `String</api/data_types/string>`   |           |        |
| `DisplayName<dbkit.datepicker.displayname>`                 | `String</api/data_types/string>`   |           |        |
| `InvalidValueMessage<dbkit.datepicker.invalidvaluemessage>` | `String</api/data_types/string>`   |           |        |
| `Mandatory<dbkit.datepicker.mandatory>`                     | `Boolean</api/data_types/boolean>` |           |        |

## Property descriptions

<div id="dbkit.datepicker.columnname">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.DatePicker.ColumnName

**ColumnName** As `String</api/data_types/string>`

> The name of the database column whose value this control displays and edits.
>
> If blank, the control's name is used as the column name. The name may be qualified with a table name (for example "tablename.columnname") when the control shows a column from a related table.
>
> <div class="tip">
>
> <div class="title">
>
> Tip
>
> </div>
>
> Instead of setting this property, you can name the control the same as the database column. DBKit first looks at the ColumnName property; if it is blank, it then uses the name of the control itself.
>
> </div>

<div id="dbkit.datepicker.displayname">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.DatePicker.DisplayName

**DisplayName** As `String</api/data_types/string>`

> A user-friendly name for the control, shown to the user in place of the column name (for example in the `InvalidValueMessage<dbkit.datepicker.invalidvaluemessage>`).
>
> If blank, the column name is de-camelcased automatically (for example "FirstName" becomes "First Name").

<div id="dbkit.datepicker.invalidvaluemessage">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.DatePicker.InvalidValueMessage

**InvalidValueMessage** As `String</api/data_types/string>`

> The message displayed when the field is mandatory but no date has been selected. Use \<\$1\> as a placeholder for the control's display name.
>
> The default is "\<\$1\> must have a selected date."

<div id="dbkit.datepicker.mandatory">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

DBKit.DatePicker.Mandatory

**Mandatory** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the field must contain a value before the row can be saved. When a row with an empty mandatory field is saved, the `InvalidValueMessage<dbkit.datepicker.invalidvaluemessage>` is displayed and the save is cancelled.
>
> The default is `False</api/language/false>`.

## Notes

### Localization

Localize the control's user-facing text (`InvalidValueMessage<dbkit.datepicker.invalidvaluemessage>`) the standard Xojo way: assign a dynamic constant to each property and provide translations for as many languages as you need, or localize the property values directly.

## Compatibility

|                       |     |
|-----------------------|-----|
| **Project Types**     | Web |
| **Operating Systems** | All |

<div id="dbkit.datepicker.seealso">

<div class="seealso">

`WebDatePicker</api/user_interface/web/webdatepicker>` parent class; `DBKit.Row</api/databases/dbkit/row>` class.

</div>

</div>
