TimePicker
TsgcHTMLComponent_TimePicker — renderize um input de hora HTML5 nativo com limites opcionais de mínimo e máximo e granularidade em segundos, em Delphi, C++ Builder e .NET.
TsgcHTMLComponent_TimePicker — renderize um input de hora HTML5 nativo com limites opcionais de mínimo e máximo e granularidade em segundos, em Delphi, C++ Builder e .NET.
Um componente de input com rótulo que emite um form-control do Bootstrap do tipo HTML5 time. Defina os limites, então leia a propriedade HTML (ou chame o helper estático Build).
TsgcHTMLComponent_TimePicker
<input type="time"> HTML5 nativo
Delphi, C++ Builder, .NET
Defina FieldName, LabelText e os limites MinTime/MaxTime, então leia HTML — ou chame o helper estático Build para uma linha única.
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");
Os membros que você usa com mais frequência.
Value pré-preenche o input; FieldName define seu name; LabelText renderiza um form-label.
MinTime e MaxTime restringem o intervalo selecionável através dos atributos nativos min/max.
StepSeconds define o atributo step diretamente; ShowSeconds (padrão False) é um atalho que solicita granularidade de um segundo quando StepSeconds permanece em 0.
Required e Disabled sinalizam o input nativo.
Size (TsgcHTMLSize: hsExtraSmall…hsExtraLarge, padrão hsMedium) corresponde ao form-control-sm/form-control-lg do Bootstrap.
Build(fieldName, labelText, value) retorna o markup em uma única linha, sem precisar gerenciar uma instância.
| Ajuda onlineReferência completa da API e guia de uso para este componente. | Abrir | |
| Todos os Componentes sgcHTMLExplore a matriz completa de recursos com mais de 80 componentes. | Abrir | |
| Baixar Versão de Avaliação GratuitaA avaliação de 30 dias inclui os projetos de demonstração 60.HTML. | Abrir | |
| PreçosLicenças Single, Team e Site com código-fonte completo. | Abrir |