Skip to main content

DatePicker

The DatePicker widget is a compact input control: tap it to open a scroll-wheel picker and choose a year, month, and day.
Use it to collect a single date — a birth date or a reservation date — in a tight space.

Definition and role

The DatePicker widget draws an input area that holds the selected date (or the hint text) and an icon. Tap the area to open the picker; confirm a date and the action wired to onDateSelected runs. Configure the display format, the year range, which of year, month, and day appear, the icon, and the size.

  • Category: Contents
  • Default hint text: 날짜를 선택하세요
  • Default size: 176 x 36

Features

FeatureDescription
Date selectionTap the input area to open the scroll-wheel picker, choose a year, month, and day, then confirm. Confirming runs the action wired to onDateSelected.
Display formatSet the display format of the selected date with dateFormat. When it's not set, the date appears as yyyy.MM.dd.
Hint textSet the hint text shown before a date is selected (hintText) and its text style.
Year rangeLimit the selectable years with minYear and maxYear.
Picker fieldsTurn the year, month, and day fields on or off individually.
Icon and appearanceAdjust the input area icon (size and color) along with the size, padding, and background decoration.

How to use

  1. Open the Contents category in the left widget palette.
  2. Drag and drop the DatePicker item onto the canvas.
  3. In the Properties panel on the right, set hintText, dateFormat, the year range, and other values as you need them.
  4. Wire the action (logic or script) that runs once a date is confirmed to onDateSelected.
  5. Adjust the icon, the size, and the background decoration (decoration) if you need to.

Properties

note

Set the detailed text styles for the hint and the date in hintTextStyle and dateTextStyle. The properties below are specific to DatePicker.

PropertyDescriptionDefaultValue / Type
SizeInput area size — a grouped property that sets width and height togetherWidth 176, height 36Size (width and height, number in px)
paddingInner paddingNot setPadding value
decorationBackground decoration (color, border, and corners)Not setBox decoration
hintTextHint text shown before a date is selected날짜를 선택하세요String
hintTextStyleText style for the hint textNot setText style
dateTextStyleText style for the selected dateNot setText style
dateFormatDisplay format for the selected date (yyyy.MM.dd when not set)Not setString
iconIcon shown in the input areaNot setIcon settings
iconSizeIcon size16Number (px)
iconColorIcon color#9E9E9E (gray)Color
minYearEarliest selectable year1900Number
maxYearLatest selectable year2099Number
pickerYearVisibleWhether the year appears in the pickertruetrue / false
pickerMonthVisibleWhether the month appears in the pickertruetrue / false
pickerDayVisibleWhether the day appears in the pickertruetrue / false
selectedDateInitial selected dateNot setString

Notes and tips

warning

maxYear must be greater than or equal to minYear. If maxYear is smaller than minYear, it appears as a property error.

tip

Turn pickerYearVisible, pickerMonthVisible, and pickerDayVisible off individually to shape which fields the picker shows — a year-and-month-only picker, for example.

Learn more

tip

For the complete Widget Control (Property, Method, and Event) that drives this widget from a script, visit DatePicker Widget Control.