DateTimeEditコンポーネントはDataverseの日付と時刻の列の日付/時間ピッカーをレンダリングします。日付のみ、時間のみ、日付と時間の統合モードに対応しています。
<DateTimeEdit columnName="ppp_birthdate" /><DateTimeEdit ColumnName="ppp_birthdate" />EditorTypeDateTimeEditorType.DateTime(デフォルト)、DateTimeEditorType.DateOnly、またはDateTimeEditorType.TimeOnlyのどれかを選べるように設定してください。
{/* 日付と時間(デフォルト) */}
<DateTimeEdit columnName="ppp_birthdate" editorType={DateTimeEditorType.DateTime} />
{/* 日付のみ */}
<DateTimeEdit columnName="ppp_birthdate" editorType={DateTimeEditorType.DateOnly} />
{/* 時間だけ */}
<DateTimeEdit columnName="ppp_birthdate" editorType={DateTimeEditorType.TimeOnly} /><!-- 日付と時間(デフォルト) -->
<DateTimeEdit ColumnName="ppp_birthdate" EditorType="DateTimeEditorType.DateTime" />
<!-- 日付のみ -->
<DateTimeEdit ColumnName="ppp_birthdate" EditorType="DateTimeEditorType.DateOnly" />
<!-- 時間だけ -->
<DateTimeEdit ColumnName="ppp_birthdate" EditorType="DateTimeEditorType.TimeOnly" />DisabledDateFuncパラメータを使って、カレンダーピッカーで無効にすべき日付のtrueを返す関数を提供します。
<DateTimeEdit
columnName="ppp_birthdate"
disabledDateFunc={(date) => date > new Date()}
/><DateTimeEdit ColumnName="ppp_birthdate"
DisabledDateFunc="@(date => date > DateTime.Today)" />日付・時刻の欄にバインドされた基本的な DateTimeEdit です。
以下のコントロールを使って利用可能な物件を探りましょう。
** 注記 ** DisabledDateFuncによって将来の日付は無効になります。
名称 | 種類 | デフォルト | 概要 |
|---|---|---|---|
ChildContent | RenderFragment? | コンポーネントの子コンテンツ | |
ColumnName* | string | テーブルレコードからエディタをバインドするための論理カラム名。 | |
Description | string? | 説明はツールチップに表示されます。 | |
Disabled | bool? | エディターを無効にすべきか。 | |
DisabledDateFunc | Func<DateTime, bool>? | ||
DisplayLabelWhenAvailable | bool | True | ラベルが可能であれば表示するかどうかを明記しています。 |
DisplayTooltipWhenAvailable | bool | True | ツールチップが表示されるかどうかを指定します。 |
DisplayValidationErrorMessage | bool | True | コンポーネントが検証に失敗したときに検証エラーメッセージを表示するべきでしょうか? |
EditorType | DateTimeEditorType? | ||
IsVisible | bool | True | エディターは見えますか? |
Label | string? | 編集者用のラベルとして表示されるテキスト。 | |
ReadOnly | bool? | エディターは読み取り専用であるべきです。 | |
Required | bool? | 価値が求められるかどうか。 | |
Value | DateTime? | 型の価値 Models.ColumnValueBase |
ChildContentColumnName*DescriptionDisabledDisabledDateFuncDisplayLabelWhenAvailableDisplayTooltipWhenAvailableDisplayValidationErrorMessageEditorTypeIsVisibleLabelReadOnlyRequiredValueModels.ColumnValueBase名称 | 種類 | 概要 |
|---|---|---|
ValueChanged | EventCallback<ColumnValueBase> | バウンド値を更新するコールバックを取得または設定します。 |
ValueChanged名称 | パラメータ | 種類 | 概要 |
|---|---|---|---|
GetValidationErrors | List<string> | 現在の検証エラーの集合を返します。 |
GetValidationErrors