TimePicker
TsgcHTMLComponent_TimePicker — render a native HTML5 time input with optional min and max bounds and second-level granularity, in Delphi, C++ Builder and .NET.
TsgcHTMLComponent_TimePicker — render a native HTML5 time input with optional min and max bounds and second-level granularity, in Delphi, C++ Builder and .NET.
A labelled input component that emits a Bootstrap form-control of HTML5 type time. Set the bounds, then read the HTML property (or call the static Build helper).
TsgcHTMLComponent_TimePicker
Native HTML5 <input type="time">
Delphi, C++ Builder, .NET
Set FieldName, LabelText and the MinTime/MaxTime bounds, then read HTML — or call the static Build helper for a one-liner.
uses
sgcHTML_Component_TimePicker;
var
oTime: TsgcHTMLComponent_TimePicker;
begin
oTime := TsgcHTMLComponent_TimePicker.Create(nil);
try
oTime.FieldName := 'appointment_time';
oTime.LabelText := 'Appointment time';
oTime.MinTime := '08:00';
oTime.MaxTime := '18:00';
oTime.Required := True;
WebModule.Response := oTime.HTML; // <input type="time">
finally
oTime.Free;
end;
end;
// Or the static one-liner (field name, label, value):
Result := TsgcHTMLComponent_TimePicker.Build('appointment_time', 'Appointment time');
// includes: sgcHTML_Component_TimePicker.hpp
TsgcHTMLComponent_TimePicker *oTime = new TsgcHTMLComponent_TimePicker(NULL);
try
{
oTime->FieldName = "appointment_time";
oTime->LabelText = "Appointment time";
oTime->MinTime = "08:00";
oTime->MaxTime = "18:00";
oTime->Required = true;
String html = oTime->HTML; // <input type="time">
}
__finally
{
delete oTime;
}
// Or the static one-liner:
String html = TsgcHTMLComponent_TimePicker::Build("appointment_time", "Appointment time");
using esegece.sgcWebSockets;
var time = new TsgcHTMLComponent_TimePicker();
time.FieldName = "appointment_time";
time.LabelText = "Appointment time";
time.MinTime = "08:00";
time.MaxTime = "18:00";
time.Required = true;
string html = time.HTML; // <input type="time">
// Or the static one-liner:
string html2 = TsgcHTMLComponent_TimePicker.Build("appointment_time", "Appointment time");
The members you reach for most often.
Value pre-fills the input; FieldName sets its name; LabelText renders a form-label.
MinTime and MaxTime constrain the selectable range via the native min/max attributes.
StepSeconds sets the step attribute directly; ShowSeconds (default False) is a shortcut that requests one-second granularity when StepSeconds is left at 0.
Required and Disabled flag the native input.
Size (TsgcHTMLSize: hsExtraSmall…hsExtraLarge, default hsMedium) maps onto Bootstrap's form-control-sm/form-control-lg.
Build(fieldName, labelText, value) returns the markup in one line without managing an instance.
| Online HelpFull API reference and usage guide for this component. | Open | |
| All sgcHTML ComponentsBrowse the full feature matrix of 80+ components. | Open | |
| Download Free TrialThe 30-day trial ships the 60.HTML demo projects. | Open | |
| PricingSingle, Team and Site licenses with full source code. | Open |