FMX.Pickers.TPickerFactoryService.CreateDateTimePicker

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function CreateDateTimePicker: TCustomDateTimePicker;

C++

TCustomDateTimePicker* __fastcall CreateDateTimePicker();

Properties

Type Visibility Source Unit Parent
function public
FMX.Pickers.pas
FMX.Pickers.hpp
FMX.Pickers TPickerFactoryService

Description

Creates and initializes the platform-specific control element for date and time selection.

CreateDateTimePicker implements the CreateDateTimePicker method declared in the IFMXPickerService interface.

CreateDateTimePicker creates a new Date-Time picker and adds it into the list of pickers created in the IFMXPickerService platform service.

CreateDateTimePicker calls the virtual abstract DoCreateDateTimePicker method, which in turn is implemented in the platform-specific units like FMX.Pickers.Default or FMX.Pickers.iOS. This trick provides the platform-specific engine for the Date-Time picker. As a result, the Date-Time picker can give a native view and native behavior for date-time managing controls under different platforms. For example, Windows and MacOS provide the standard calendar control for a date selection, but iOS provides the rotating wheel controls for date selection:

Rotating wheels for date selection

See Also