TimePicker 컴포넌트 — sgcHTML | eSeGeCe

TimePicker

TsgcHTMLComponent_TimePicker — Delphi, C++ Builder 및 .NET에서 선택적 최소 및 최대 범위와 초 단위 세분성을 갖춘 네이티브 HTML5 시간 입력을 렌더링합니다.

TsgcHTMLComponent_TimePicker

HTML5 time 타입의 Bootstrap form-control을 내보내는, 레이블이 있는 입력 컴포넌트입니다. 범위를 설정한 다음, HTML 속성을 읽습니다 — 또는 정적 Build 헬퍼를 호출하십시오.

컴포넌트 클래스

TsgcHTMLComponent_TimePicker

렌더링

네이티브 HTML5 <input type="time">

패밀리

폼 및 입력

언어

Delphi, C++ Builder, .NET

생성하고, 범위를 설정하고, 렌더링하기

FieldName, LabelTextMinTime/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는 입력을 미리 채웁니다. FieldNamename을 설정합니다. LabelTextform-label을 렌더링합니다.

범위

MinTimeMaxTime은 네이티브 min/max 속성을 통해 선택 가능한 범위를 제한합니다.

세분성

StepSecondsstep 속성을 직접 설정합니다. ShowSeconds(기본값 False)는 StepSeconds0으로 남아 있을 때 초 단위 세분성을 요청하는 단축 옵션입니다.

유효성 검사 및 상태

RequiredDisabled는 네이티브 입력에 플래그를 지정합니다.

크기

Size(TsgcHTMLSize: hsExtraSmallhsExtraLarge, 기본값 hsMedium)는 Bootstrap의 form-control-sm/form-control-lg에 대응됩니다.

정적 헬퍼

Build(fieldName, labelText, value)는 인스턴스를 관리하지 않고도 한 줄로 마크업을 반환합니다.

계속 살펴보기

온라인 도움말이 찱포넌트의 전체 API 참조 및 사용 가이드입니다.
모든 sgcHTML 컴포넌트80개 이상의 컴포넌트 전체 기능 매트릭스를 둘러보십시오.
무료 체험판 다운로드30일 체험판에는 60.HTML 데모 프로젝트가 포함됩니다.
가격전체 소스 코드가 포함된 Single, Team 및 Site 라이선스.

시작할 준비가 되셨습니까?

무료 체험판을 다운로드하고 Delphi, C++ Builder 또는 .NET 웹 앱에 날짜 및 시간 선택기를 추가하십시오.