IupDatePick
Creates a date editing interface element, which can displays a calendar for selecting a date.
In Windows, Qt, Android, iOS and WebAssembly it is a native element. In GTK, GTK 4, WinUI, macOS, EFL, FLTK, Motif and Haiku it is a custom element built with IUP controls.
Creation
Ihandle* IupDatePick();
Returns: the identifier of the created element, or NULL if an error occurs.
Attributes
CALENDARWEEKNUMBERS: Shows the number of the week along the year in the calendar. Default: NO. Not supported in macOS, WinUI, EFL, Android, iOS and WebAssembly.
FORMAT [Windows, Qt and Android Only]: Flexible format for the date. In Windows, for more information see "About Date and Time Picker Control" in the Windows SDK. The control was configured to display date only without any time options. In Qt, uses QDateEdit display format. Android uses the same pattern letters as Windows/Qt. Default: "d'/'M'/'yyyy". See Notes below.
MONTHSHORTNAMES [Windows, Qt and Android Only]: Month display will use a short name instead of numbers. Must be set before ORDER. Default: NO. Names will be in the language of the system.
ORDER: Day, month and year order. Can be any combination of "D", "M" and "Y" without repetition, and with all three letters. It will set the FORMAT attribute in Windows. It will NOT affect the VALUE attribute order. Default: "DMY". Not supported in iOS and WebAssembly.
SEPARATOR: Separator between day, month and year. Must be set before ORDER in Windows. Default: "/". Not supported in iOS and WebAssembly.
SHOWDROPDOWN (write-only): opens or closes the dropdown calendar. Can be "YES" or "NO". Ignored if set before map. In Windows, it works only for NO. Not supported in Qt and iOS.
TODAY (read-only): Returns the date corresponding to today in VALUE format.
VALUE: the current date always in the format "year/month/day" ("%d/%d/%d" in C). Can be set to "TODAY". Default value is the today date.
ZEROPRECED: Day and month numbers will be preceded by a zero. Must be set before ORDER in Windows. Default: NO. Not supported in iOS and WebAssembly.
Callbacks
VALUECHANGED_CB: Called after the value was interactively changed by the user.
int function(Ihandle *ih);
ih: identifier of the element that activated the event.
MAP_CB, UNMAP_CB, DESTROY_CB, GETFOCUS_CB, KILLFOCUS_CB, ENTERWINDOW_CB, LEAVEWINDOW_CB, K_ANY, HELP_CB: All common callbacks are supported.
Notes
In GTK, GTK 4, WinUI, macOS, EFL, FLTK, Motif and Haiku it is a custom control built with IUP elements.
In iOS, the label uses the system locale's date format; ORDER, SEPARATOR, ZEROPRECED, MONTHSHORTNAMES and FORMAT are not supported.
In Windows, when the user navigates to other pages in the calendar, the date is not changed until the user actually selects a day.
In Windows and Qt, FORMAT can have the following values, but other text in the format string must be enclosed in single quotes:
| Element | Description |
|---|---|
| "d" | The one- or two-digit day. (default) |
| "dd" | The two-digit day. Single-digit day values are preceded by a zero.(Set when ZEROPRECED=YES) |
| "ddd" | The three-character weekday abbreviation. |
| "dddd" | The full weekday name. |
| "M" | The one- or two-digit month number. (default) |
| "MM" | The two-digit month number. Single-digit values are preceded by a zero. (Set when ZEROPRECED=YES) |
| "MMM" | The three-character month abbreviation.(Set when MONTHSHORTNAMES=YES) |
| "MMMM" | The full month name. |
| "yy" | The last two digits of the year (that is, 1996 would be displayed as "96").(Not recommended) |
| "yyyy" | The full year (that is, 1996 would be displayed as "1996"). (default) |
Examples
| GTK | Qt | Win32 | macOS |
![]() |
![]() |
![]() |
![]() |



