TimePicker
TsgcHTMLComponent_TimePicker — renderizza un input orario HTML5 nativo con limiti min e max opzionali e granularità a livello di secondi, in Delphi, C++ Builder e .NET.
TsgcHTMLComponent_TimePicker — renderizza un input orario HTML5 nativo con limiti min e max opzionali e granularità a livello di secondi, in Delphi, C++ Builder e .NET.
Un componente di input con etichetta che emette un form-control Bootstrap di tipo HTML5 time. Imposta i limiti, quindi leggi la proprietà HTML (oppure chiama l’helper statico Build).
TsgcHTMLComponent_TimePicker
Native HTML5 <input type="time">
Delphi, C++ Builder, .NET
Imposta FieldName, LabelText e i limiti MinTime/MaxTime, quindi leggi HTML — oppure chiama l’helper statico Build per una riga sola.
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");
I membri che utilizzerai più spesso.
Value precompila l’input; FieldName ne imposta il name; LabelText renderizza un form-label.
MinTime e MaxTime limitano l’intervallo selezionabile tramite gli attributi nativi min/max.
StepSeconds imposta direttamente l’attributo step; ShowSeconds (predefinito False) è una scorciatoia che richiede una granularità di un secondo quando StepSeconds viene lasciato a 0.
Required e Disabled contrassegnano l’input nativo.
Size (TsgcHTMLSize: hsExtraSmall…hsExtraLarge, predefinito hsMedium) corrisponde a form-control-sm/form-control-lg di Bootstrap.
Build(fieldName, labelText, value) restituisce il markup in una sola riga senza dover gestire un’istanza.
| Guida in lineaRiferimento API completo e guida all’uso per questo componente. | Apri | |
| Tutti i componenti sgcHTMLEsplora la matrice completa delle funzionalità di oltre 80 componenti. | Apri | |
| Scarica la Prova GratuitaLa prova di 30 giorni include i progetti demo 60.HTML. | Apri | |
| PrezziLicenze Single, Team e Site con codice sorgente completo. | Apri |