コンテンツへスキップ

コンポーネント

日付入力欄

ピッカーを使わずに日付を入力するためのマスク付きフィールド。

使い方

基本

HTML
<bs:bsui-date-input placeholder="YYYY-MM-DD" />

ラベル付きフィールド

実際のフォームに表示されるように、ラベルとヘルプテキストを組み合わせています。

Bookings open the day after this date.
HTML
<bs:bsui-field>
  <bs:bsui-field-label text="Start date" />
  <bs:bsui-date-input name="start_date" placeholder="Pick a start date" />
  <bs:bsui-field-description text="Bookings open the day after this date." />
</bs:bsui-field>

日付範囲

2つの入力欄が横並びで、それぞれ別の名前で送信されます。

HTML
<bs:bsui-stack direction="row" gap="4" align="start">
  <bs:bsui-field>
    <bs:bsui-field-label text="From" />
    <bs:bsui-date-input name="from" placeholder="Check in" />
  </bs:bsui-field>
  <bs:bsui-field>
    <bs:bsui-field-label text="To" />
    <bs:bsui-date-input name="to" placeholder="Check out" />
  </bs:bsui-field>
</bs:bsui-stack>

無効

トリガーとカレンダーボタンのどちらも反応しません。

HTML
<bs:bsui-date-input placeholder="Locked until renewal" disabled="true" />

属性

属性タイプデフォルト
name text —
placeholder text Pick a date
disabled toggle false
nameAlt text —
onChange text —