Skip to content

Commit 11640aa

Browse files
committed
Examples
1 parent 3d998dc commit 11640aa

File tree

7 files changed

+44
-0
lines changed

7 files changed

+44
-0
lines changed

Documentation/Blazorise.Docs/Models/Snippets.generated.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,6 +1870,8 @@ void OnDateChanged( DateTime? date )
18701870
}
18711871
}";
18721872

1873+
public const string DatePickerDefaultTimesExample = @"<DatePicker TValue=""DateTime?"" InputMode=""DateInputMode.DateTime"" DefaultHour=""9"" DefaultMinute=""15"" />";
1874+
18731875
public const string DatePickerDisabledDatesExample = @"<DatePicker TValue=""DateTime?"" DisabledDates=""@disabledDates"" />
18741876

18751877
@code {
@@ -4839,6 +4841,8 @@ Task OnTimeChanged( TimeSpan? Time )
48394841
}
48404842
}";
48414843

4844+
public const string TimePickerDefaultTimesExample = @"<TimePicker TValue=""TimeSpan?"" DefaultHour=""9"" DefaultMinute=""15"" />";
4845+
48424846
public const string TimePickerIncrementsExample = @"<TimePicker TValue=""TimeSpan?"" HourIncrement=""2"" MinuteIncrement=""30"" />";
48434847

48444848
public const string TimePickerNonStaticExample = @"<TimePicker TValue=""TimeSpan?"" @bind-Time=""@value"" StaticPicker=""false"" />
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<div class="blazorise-codeblock">
2+
<div class="html"><pre>
3+
<span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">DatePicker</span> <span class="htmlAttributeName">TValue</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue">DateTime?</span><span class="quot">&quot;</span> <span class="htmlAttributeName">InputMode</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="enum">DateInputMode</span><span class="enumValue">.DateTime</span><span class="quot">&quot;</span> <span class="htmlAttributeName">DefaultHour</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue">9</span><span class="quot">&quot;</span> <span class="htmlAttributeName">DefaultMinute</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue">15</span><span class="quot">&quot;</span> <span class="htmlTagDelimiter">/&gt;</span>
4+
</pre></div>
5+
</div>

Documentation/Blazorise.Docs/Pages/Docs/Components/Dates/DatePickerPage.razor

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,18 @@
160160
<DocsPageSectionSource Code="DatePickerShowButtonsExample" />
161161
</DocsPageSection>
162162

163+
<DocsPageSection>
164+
<DocsPageSectionHeader Title="Default time">
165+
<Paragraph>
166+
By default the time elements are set to <Strong>12:00</Strong>. To change it use the <Code>DefaultHour</Code> and <Code>DefaultMinute</Code> parameters.
167+
</Paragraph>
168+
</DocsPageSectionHeader>
169+
<DocsPageSectionContent Outlined FullWidth>
170+
<DatePickerDefaultTimesExample />
171+
</DocsPageSectionContent>
172+
<DocsPageSectionSource Code="DatePickerDefaultTimesExample" />
173+
</DocsPageSection>
174+
163175
<DocsPageSubtitle>
164176
Formats
165177
</DocsPageSubtitle>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@namespace Blazorise.Docs.Docs.Examples
2+
3+
<DatePicker TValue="DateTime?" InputMode="DateInputMode.DateTime" DefaultHour="9" DefaultMinute="15" />
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<div class="blazorise-codeblock">
2+
<div class="html"><pre>
3+
<span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">TimePicker</span> <span class="htmlAttributeName">TValue</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue">TimeSpan?</span><span class="quot">&quot;</span> <span class="htmlAttributeName">DefaultHour</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue">9</span><span class="quot">&quot;</span> <span class="htmlAttributeName">DefaultMinute</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue">15</span><span class="quot">&quot;</span> <span class="htmlTagDelimiter">/&gt;</span>
4+
</pre></div>
5+
</div>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@namespace Blazorise.Docs.Docs.Examples
2+
3+
<TimePicker TValue="TimeSpan?" DefaultHour="9" DefaultMinute="15" />

Documentation/Blazorise.Docs/Pages/Docs/Components/Times/TimePickerPage.razor

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,16 @@
9191
<DocsPageSectionSource Code="TimePickerIncrementsExample" />
9292
</DocsPageSection>
9393

94+
<DocsPageSection>
95+
<DocsPageSectionHeader Title="Default time">
96+
<Paragraph>
97+
By default the time elements are set to <Strong>12:00</Strong>. To change it use the <Code>DefaultHour</Code> and <Code>DefaultMinute</Code> parameters.
98+
</Paragraph>
99+
</DocsPageSectionHeader>
100+
<DocsPageSectionContent Outlined FullWidth>
101+
<TimePickerDefaultTimesExample />
102+
</DocsPageSectionContent>
103+
<DocsPageSectionSource Code="TimePickerDefaultTimesExample" />
104+
</DocsPageSection>
105+
94106
<ComponentApiDocs ComponentTypes="[typeof(TimePicker<>)]" />

0 commit comments

Comments
 (0)