TimePicker
TsgcHTMLComponent_TimePicker — renderiza un input de hora HTML5 nativo con límites opcionales de mínimo y máximo y granularidad de segundos, en Delphi, C++ Builder y .NET.
TsgcHTMLComponent_TimePicker — renderiza un input de hora HTML5 nativo con límites opcionales de mínimo y máximo y granularidad de segundos, en Delphi, C++ Builder y .NET.
Un componente de input con etiqueta que emite un form-control de Bootstrap de tipo HTML5 time. Define los límites, y luego lee la propiedad HTML (o llama al método estático Build).
TsgcHTMLComponent_TimePicker
Input de hora HTML5 nativo <input type="time">
Delphi, C++ Builder, .NET
Define FieldName, LabelText y los límites MinTime/MaxTime, y luego lee HTML — o llama al método estático Build para una sola línea.
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");
Los miembros que usarás con más frecuencia.
Value precarga el input; FieldName define su name; LabelText renderiza una form-label.
MinTime y MaxTime restringen el rango seleccionable mediante los atributos nativos min/max.
StepSeconds define el atributo step directamente; ShowSeconds (por defecto False) es un atajo que solicita granularidad de un segundo cuando StepSeconds se deja en 0.
Required y Disabled marcan el input nativo.
Size (TsgcHTMLSize: hsExtraSmall…hsExtraLarge, por defecto hsMedium) se corresponde con form-control-sm/form-control-lg de Bootstrap.
Build(fieldName, labelText, value) devuelve el marcado en una sola línea sin gestionar una instancia.
| Ayuda en líneaReferencia completa de la API y guía de uso para este componente. | Abrir | |
| Todos los componentes de sgcHTMLExplora la matriz completa de más de 80 componentes. | Abrir | |
| Descargar prueba gratuitaLa prueba de 30 días incluye los proyectos de demostración 60.HTML. | Abrir | |
| PreciosLicencias Single, Team y Site con código fuente completo. | Abrir |