File tree Expand file tree Collapse file tree
example/BlazorLocalTimeSample/Pages Expand file tree Collapse file tree Original file line number Diff line number Diff line change 149149
150150<p >
151151 If you want to use non-nullable components or create a form that sets the current date and time as the initial value,
152- you can use the <code >DateOrToday</code > and <code >TimeOrNow</code > properties.
152+ you can use the <code >ValueOrNow</ code >, < code > DateOrToday</code > and <code >TimeOrNow</code > properties.
153153</p >
154154<pre ><code class =" language-razor" >Value: @@( Dt ? .ToString (" yyyy-MM-dd HH:mm:ssK" ) ?? " Not specified yet" )
155155< ; br /> ;
156156< ; LocalTimeForm @@bind-Value="Dt" Context="dtf"> ;
157+ < ; InputDate Type="InputDateType.DateTimeLocal" @@bind-Value="dtf.ValueOrNow" /> ;
157158 < ; InputDate Type="InputDateType.Date" @@bind-Value="dtf.DateOrToday" /> ;
158159 < ; InputDate Type="InputDateType.Time" @@bind-Value="dtf.TimeOrNow" /> ;
159160 < ; button @@onclick="() => ; Dt = null"> ; Reset< ; /button> ;
168169 Value: @( Dt2 ? .ToString (" yyyy-MM-dd HH:mm:ssK" ) ?? " Not specified yet" )
169170 <br />
170171 <LocalTimeForm @bind-Value =" Dt2" Context =" dtf" >
172+ <InputDate Type =" InputDateType.DateTimeLocal" @bind-Value =" dtf.ValueOrNow" />
171173 <InputDate Type =" InputDateType.Date" @bind-Value =" dtf.DateOrToday" />
172174 <InputDate Type =" InputDateType.Time" @bind-Value =" dtf.TimeOrNow" />
173175 <button @onclick =" () => Dt2 = null" >Reset</button >
You can’t perform that action at this time.
0 commit comments