TimePicker
TsgcHTMLComponent_TimePicker — Delphi, C++ Builder 및 .NET에서 선택적 최소 및 최대 범위와 초 단위 세분성을 갖춘 네이티브 HTML5 시간 입력을 렌더링합니다.
TsgcHTMLComponent_TimePicker — Delphi, C++ Builder 및 .NET에서 선택적 최소 및 최대 범위와 초 단위 세분성을 갖춘 네이티브 HTML5 시간 입력을 렌더링합니다.
HTML5 time 타입의 Bootstrap form-control을 내보내는, 레이블이 있는 입력 컴포넌트입니다. 범위를 설정한 다음, HTML 속성을 읽습니다 — 또는 정적 Build 헬퍼를 호출하십시오.
TsgcHTMLComponent_TimePicker
네이티브 HTML5 <input type="time">
Delphi, C++ Builder, .NET
FieldName, LabelText 및 MinTime/MaxTime 범위를 설정한 다음, HTML을 읽습니다 — 또는 한 줄로 처리하려면 정적 Build 헬퍼를 호출하십시오.
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");
가장 자주 사용하게 되는 멤버.
Value는 입력을 미리 채웁니다. FieldName은 name을 설정합니다. LabelText는 form-label을 렌더링합니다.
MinTime과 MaxTime은 네이티브 min/max 속성을 통해 선택 가능한 범위를 제한합니다.
StepSeconds는 step 속성을 직접 설정합니다. ShowSeconds(기본값 False)는 StepSeconds가 0으로 남아 있을 때 초 단위 세분성을 요청하는 단축 옵션입니다.
Required와 Disabled는 네이티브 입력에 플래그를 지정합니다.
Size(TsgcHTMLSize: hsExtraSmall…hsExtraLarge, 기본값 hsMedium)는 Bootstrap의 form-control-sm/form-control-lg에 대응됩니다.
Build(fieldName, labelText, value)는 인스턴스를 관리하지 않고도 한 줄로 마크업을 반환합니다.