DatePicker
TsgcHTMLComponent_DatePicker — renderize uma entrada nativa HTML5 de data, hora ou datetime com limites mínimo e máximo opcionais, em Delphi, C++ Builder e .NET.
TsgcHTMLComponent_DatePicker — renderize uma entrada nativa HTML5 de data, hora ou datetime com limites mínimo e máximo opcionais, em Delphi, C++ Builder e .NET.
Um componente de entrada que emite um form-control Bootstrap do tipo HTML5 date, time ou datetime-local. Escolha o Mode, defina os limites e então leia a propriedade HTML.
TsgcHTMLComponent_DatePicker
<input> nativo HTML5 de data/hora
Delphi, C++ Builder, .NET
Escolha Mode, defina Name, Label_ e os limites MinDate/MaxDate e então leia HTML — ou chame o helper estático Build para uma linha única.
uses
sgcHTML_Component_DatePicker;
var
oDate: TsgcHTMLComponent_DatePicker;
begin
oDate := TsgcHTMLComponent_DatePicker.Create(nil);
try
oDate.Mode := dmDate;
oDate.Name := 'booking';
oDate.Label_ := 'Booking date';
oDate.MinDate := '2026-01-01';
oDate.MaxDate := '2026-12-31';
oDate.Required := True;
WebModule.Response := oDate.HTML; // <input type="date">
finally
oDate.Free;
end;
end;
// Or the static one-liner (name, mode, label, value):
Result := TsgcHTMLComponent_DatePicker.Build('booking', dmDate, 'Booking date');
// includes: sgcHTML_Component_DatePicker.hpp
TsgcHTMLComponent_DatePicker *oDate = new TsgcHTMLComponent_DatePicker(NULL);
try
{
oDate->Mode = dmDate;
oDate->Name = "booking";
oDate->Label_ = "Booking date";
oDate->MinDate = "2026-01-01";
oDate->MaxDate = "2026-12-31";
oDate->Required = true;
String html = oDate->HTML; // <input type="date">
}
__finally
{
delete oDate;
}
// Or the static one-liner:
String html = TsgcHTMLComponent_DatePicker::Build("booking", dmDate, "Booking date");
using esegece.sgcWebSockets;
var date = new TsgcHTMLComponent_DatePicker();
date.Mode = TsgcHTMLDatePickerMode.dmDate;
date.Name = "booking";
date.Label_ = "Booking date";
date.MinDate = "2026-01-01";
date.MaxDate = "2026-12-31";
date.Required = true;
string html = date.HTML; // <input type="date">
// Or the static one-liner:
string html2 = TsgcHTMLComponent_DatePicker.Build("booking", TsgcHTMLDatePickerMode.dmDate, "Booking date");
Os membros que você usa com mais frequência.
Mode (TsgcHTMLDatePickerMode) seleciona dmDate, dmTime ou dmDateTime, emitindo uma entrada HTML5 date, time ou datetime-local.
Name define o name da entrada; Label_ renderiza um form-label; Value pré-preenche o campo; Placeholder mostra um texto de dica.
MinDate e MaxDate restringem o intervalo selecionável através dos atributos nativos min e max; Required marca o campo como obrigatório.
Build(name, mode, label, value) retorna o markup em uma linha sem gerenciar uma instância.
HTML retorna o wrapper mb-3 com o label e o form-control tipado; DatePickerID define o id do elemento.
Os herdados Section, ColumnWidth e RowGroup posicionam o campo em uma grade TsgcHTMLPageBuilder.
| Todos os Componentes sgcHTMLExplore a matriz completa de recursos com mais de 60 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 |