A control that the user can click or tap to specify a date.

Description

If you add a Date Picker control instead of a Text input control, you help ensure that the user specifies a date in the correct format.

Key properties

DefaultDate – The initial value of a date control before it is changed by the user.

SelectedDate – The date currently selected in a date control.

Additional properties

BorderColor – The color of a control's border.

BorderStyle – Whether a control's border is Solid, Dashed, Dotted, or None.

BorderThickness – The thickness of a control's border.

FocusedBorderThickness – The thickness of the control's border when it has keyboard focus.

Color – The color of text in a control.

Disabled – Whether the user can interact with the control.

DisabledBorderColor – The color of a control's border if the control's Disabled property is set to true.

DisabledColor – The color of text in a control if its Disabled property is set to true.

DisabledFill – The background color of a control if its Disabled property is set to true.

EndYear – The latest year to which the user can set value of a date-picker control.

Fill – The background color of a control.

Font – The name of the family of fonts in which text appears.

FontWeight – The weight of the text in a control: Bold, Semibold, Normal, or Lighter.

Height – The distance between a control's top and bottom edges.

Italic – Whether the text in a control is italic.

OnSelect – How the app responds when the user taps or clicks a control.

PaddingBottom – The distance between text in a control and the bottom edge of that control.

PaddingLeft – The distance between text in a control and the left edge of that control.

PaddingRight – The distance between text in a control and the right edge of that control.

PaddingTop – The distance between text in a control and the top edge of that control.

Size – The font size of the text that appears on a control.

StartYear – The earliest year to which the user can set the value of a date-picker control.

Visible – Whether a control appears or is hidden.

Width – The distance between a control's left and right edges.

X – The distance between the left edge of a control and the left edge of the screen.

Y – The distance between the top edge of a control and the top edge of the screen.

Related functions

Year( DateTimeValue )

Example

  1. Add a Date Picker control, and name it Deadline.

    Don't know how to add, name, and configure a control?

  2. Add a Text Box control, and set its Items property to this formula:
    DateDiff(Today(), Deadline.SelectedDate) & " days to go!"

    Want more information about the DateDiff function or other functions?

  3. Press F5, choose a date in Deadline, and then click or tap OK.

    The Text Box control shows the number of days between today and the date that you chose.

  4. To return to the default workspace, press Esc.