HTML <input type = "datetime-local">
例
日付と時刻のコントロールを表示する(タイムゾーンなし):
<label for="birthdaytime">Birthday (date and time):</label>
<input type="datetime-local"
id="birthdaytime" name="birthdaytime">
定義と使用法
は<input type="datetime-local">
日付ピッカーを定義します。
結果の値には、年、月、日、および時間が含まれます。
ヒント:<label>
アクセシビリティのベストプラクティスのため に、常にタグを追加してください。
ブラウザのサポート
表の数字は、要素を完全にサポートする最初のブラウザバージョンを示しています。
Attribute | |||||
---|---|---|---|---|---|
type="datetime-local" | 20.0 | 12.0 | 93.0 | 14.1 | 11.0 |
構文
<input type="datetime-local">