|
13 | 13 | </BootstrapInputGroup> |
14 | 14 | </div> |
15 | 15 | </section> |
16 | | - <DateTimePicker ViewMode="DatePickerViewMode.DateTime" TimeFormat="hh\:mm" IsButton="_isButton" |
17 | | - Value="@DateTimePickerValue" OnValueChanged="@TimePickerValueChanged"> |
18 | | - <TimePickerSetting ShowClockScale="true" IsAutoSwitch="false" /> |
19 | | - </DateTimePicker> |
20 | | - <ConsoleLogger @ref="TimePickerLogger" class="mt-3" /> |
| 16 | + <DateTimePicker ViewMode="DatePickerViewMode.DateTime" TimeFormat="hh\:mm" IsButton="_isButton" |
| 17 | + Value="@DateTimePickerValue" OnValueChanged="@TimePickerValueChanged"> |
| 18 | + <TimePickerSetting ShowClockScale="true" IsAutoSwitch="false" /> |
| 19 | + </DateTimePicker> |
| 20 | + <ConsoleLogger @ref="TimePickerLogger" class="mt-3" /> |
21 | 21 | </DemoBlock> |
22 | 22 |
|
23 | 23 | <DemoBlock Title="@Localizer["NormalTitle"]" Introduction="@Localizer["NormalIntro"]" Name="Normal"> |
24 | | - <section ignore> |
25 | | - <GroupBox Title="@Localizer["Feature"]"> |
26 | | - <div class="row g-3 form-inline text-end"> |
| 24 | + <section ignore> |
| 25 | + <GroupBox Title="@Localizer["Feature"]"> |
| 26 | + <div class="row g-3 form-inline text-end"> |
27 | 27 | <div class="col-12 col-sm-6 col-lg-3"> |
28 | 28 | <BootstrapInputGroup> |
29 | 29 | <BootstrapInputGroupLabel DisplayText="@Localizer["FeatureShowLunar"]"></BootstrapInputGroupLabel> |
30 | 30 | <Switch @bind-Value="_showLunar" /> |
31 | 31 | </BootstrapInputGroup> |
32 | | - </div> |
| 32 | + </div> |
33 | 33 | <div class="col-12 col-sm-6 col-lg-3"> |
34 | 34 | <BootstrapInputGroup> |
35 | 35 | <BootstrapInputGroupLabel DisplayText="@Localizer["FeatureShowSolarTerm"]"></BootstrapInputGroupLabel> |
36 | 36 | <Switch @bind-Value="_showSolarTerm" /> |
37 | 37 | </BootstrapInputGroup> |
38 | | - </div> |
| 38 | + </div> |
39 | 39 | <div class="col-12 col-sm-6 col-lg-3"> |
40 | 40 | <BootstrapInputGroup> |
41 | 41 | <BootstrapInputGroupLabel DisplayText="@Localizer["FeatureShowFestivals"]"></BootstrapInputGroupLabel> |
42 | 42 | <Switch @bind-Value="_showFestivals" /> |
43 | 43 | </BootstrapInputGroup> |
44 | | - </div> |
45 | | - <div class="col-12 col-sm-6 col-lg-3"> |
| 44 | + </div> |
| 45 | + <div class="col-12 col-sm-6 col-lg-3"> |
46 | 46 | <BootstrapInputGroup> |
47 | 47 | <BootstrapInputGroupLabel DisplayText="@Localizer["FeatureShowHolidays"]"></BootstrapInputGroupLabel> |
48 | 48 | <Switch @bind-Value="_showHolidays" /> |
49 | | - </BootstrapInputGroup> |
50 | | - </div> |
51 | | - </div> |
52 | | - </GroupBox> |
53 | | - <div class="mt-3"> |
54 | | - <Pre>builder.Services.AddBootstrapHolidayService();</Pre> |
55 | | - </div> |
56 | | - </section> |
57 | | - <DatePickerBody @bind-Value="Value" OnConfirm="@NormalOnConfirm" ShowFooter="false" ShowLunar="_showLunar" ShowSolarTerm="_showSolarTerm" ShowFestivals="_showFestivals" ShowHolidays="_showHolidays" /> |
58 | | - <ConsoleLogger @ref="NormalLogger" class="mt-3" /> |
59 | | - <section ignore> |
60 | | - <Tips class="mt-3"> |
61 | | - <p>@((MarkupString)Localizer["FeatureIntro"].Value)</p> |
62 | | - <ul class="ul-demo mt-3"> |
63 | | - <li>@((MarkupString)Localizer["FeatureShowLunarIntro"].Value)</li> |
64 | | - <li>@((MarkupString)Localizer["FeatureShowSolarTermIntro"].Value)</li> |
65 | | - <li>@((MarkupString)Localizer["FeatureShowFestivalsIntro"].Value)</li> |
66 | | - <li>@((MarkupString)Localizer["FeatureShowHolidaysIntro"].Value)</li> |
67 | | - </ul> |
68 | | - <div>@((MarkupString)Localizer["FeatureFestivalIntro"].Value)</div> |
69 | | - </Tips> |
70 | | - </section> |
| 49 | + </BootstrapInputGroup> |
| 50 | + </div> |
| 51 | + </div> |
| 52 | + </GroupBox> |
| 53 | + <div class="mt-3"> |
| 54 | + <Pre>builder.Services.AddBootstrapHolidayService();</Pre> |
| 55 | + </div> |
| 56 | + </section> |
| 57 | + <DatePickerBody @bind-Value="Value" OnConfirm="@NormalOnConfirm" ShowFooter="false" ShowLunar="_showLunar" ShowSolarTerm="_showSolarTerm" ShowFestivals="_showFestivals" ShowHolidays="_showHolidays" /> |
| 58 | + <ConsoleLogger @ref="NormalLogger" class="mt-3" /> |
| 59 | + <section ignore> |
| 60 | + <Tips class="mt-3"> |
| 61 | + <p>@((MarkupString)Localizer["FeatureIntro"].Value)</p> |
| 62 | + <ul class="ul-demo mt-3"> |
| 63 | + <li>@((MarkupString)Localizer["FeatureShowLunarIntro"].Value)</li> |
| 64 | + <li>@((MarkupString)Localizer["FeatureShowSolarTermIntro"].Value)</li> |
| 65 | + <li>@((MarkupString)Localizer["FeatureShowFestivalsIntro"].Value)</li> |
| 66 | + <li>@((MarkupString)Localizer["FeatureShowHolidaysIntro"].Value)</li> |
| 67 | + </ul> |
| 68 | + <div>@((MarkupString)Localizer["FeatureFestivalIntro"].Value)</div> |
| 69 | + </Tips> |
| 70 | + </section> |
71 | 71 | </DemoBlock> |
72 | 72 |
|
73 | 73 | <DemoBlock Title="@Localizer["ValidateFormTitle"]" Introduction="@Localizer["ValidateFormIntro"]" Name="ValidateForm"> |
74 | | - <ValidateForm Model="this"> |
75 | | - <div class="row g-3"> |
76 | | - <div class="col-12 col-sm-auto"> |
77 | | - <DateTimePicker @bind-Value="@ValidateFormValue" /> |
78 | | - </div> |
79 | | - <div class="col-12 col-sm-auto align-self-end"> |
80 | | - <Button ButtonType="ButtonType.Submit" Text="@Localizer["SubmitText"]" Icon="fa-solid fa-floppy-disk"></Button> |
81 | | - </div> |
82 | | - </div> |
83 | | - </ValidateForm> |
| 74 | + <ValidateForm Model="this"> |
| 75 | + <div class="row g-3"> |
| 76 | + <div class="col-12 col-sm-auto"> |
| 77 | + <DateTimePicker @bind-Value="@ValidateFormValue" /> |
| 78 | + </div> |
| 79 | + <div class="col-12 col-sm-auto align-self-end"> |
| 80 | + <Button ButtonType="ButtonType.Submit" Text="@Localizer["SubmitText"]" Icon="fa-solid fa-floppy-disk"></Button> |
| 81 | + </div> |
| 82 | + </div> |
| 83 | + </ValidateForm> |
84 | 84 | </DemoBlock> |
85 | 85 |
|
86 | 86 | <DemoBlock Title="@Localizer["ShowIconTitle"]" Introduction="@Localizer["ShowIconIntro"]" Name="ShowIcon"> |
87 | | - <DateTimePicker TValue="DateTimeOffset?" ShowIcon="false" /> |
| 87 | + <DateTimePicker TValue="DateTimeOffset ?" ShowIcon="false" /> |
88 | 88 | </DemoBlock> |
89 | 89 |
|
90 | 90 | <DemoBlock Title="@Localizer["DateTimeOffsetTitle"]" Introduction="@Localizer["DateTimeOffsetIntro"]" Name="DateTimeOffset"> |
91 | | - <DateTimePicker @bind-Value="DateTimeOffsetValue" /> |
| 91 | + <DateTimePicker @bind-Value="DateTimeOffsetValue" /> |
92 | 92 | </DemoBlock> |
93 | 93 |
|
94 | 94 | <DemoBlock Title="@Localizer["BindValueTitle"]" Introduction="@Localizer["BindValueIntro"]" Name="BindValue"> |
95 | | - <div class="row g-3"> |
96 | | - <div class="col-sm-6"> |
97 | | - <DateTimePicker @bind-Value="@BindValue" IsEditable="true" DateFormat="dd/MM/yyyy" /> |
98 | | - </div> |
99 | | - <div class="col-sm-6"> |
100 | | - <input class="form-control" @bind="@BindValueString" /> |
101 | | - </div> |
102 | | - </div> |
| 95 | + <div class="row g-3"> |
| 96 | + <div class="col-sm-6"> |
| 97 | + <DateTimePicker @bind-Value="@BindValue" IsEditable="true" DateFormat="dd/MM/yyyy" /> |
| 98 | + </div> |
| 99 | + <div class="col-sm-6"> |
| 100 | + <input class="form-control" @bind="@BindValueString" /> |
| 101 | + </div> |
| 102 | + </div> |
103 | 103 | </DemoBlock> |
104 | 104 |
|
105 | 105 | <DemoBlock Title="@Localizer["IsEditableTitle"]" Introduction="@Localizer["IsEditableIntro"]" Name="IsEditable"> |
106 | | - <div class="row g-3"> |
107 | | - <div class="col-sm-6"> |
108 | | - <DateTimePicker @bind-Value="@BindValue" IsEditable="true" DateFormat="yyyy-MM-dd" /> |
109 | | - </div> |
110 | | - </div> |
| 106 | + <div class="row g-3"> |
| 107 | + <div class="col-sm-6"> |
| 108 | + <DateTimePicker @bind-Value="@BindValue" IsEditable="true" DateFormat="yyyy-MM-dd" /> |
| 109 | + </div> |
| 110 | + </div> |
111 | 111 | </DemoBlock> |
112 | 112 |
|
113 | 113 | <DemoBlock Title="@Localizer["ViewModeTitle"]" Introduction="@Localizer["ViewModeIntro"]" Name="ViewMode"> |
114 | | - <section ignore>@((MarkupString)Localizer["ViewModeTip"].Value)</section> |
115 | | - <div class="row g-3"> |
116 | | - <div class="col-12 col-sm-6"> |
117 | | - <DateTimePicker @bind-Value="YearValue" ShowLabel="true" DisplayText="Year" ViewMode="DatePickerViewMode.Year" DateFormat="yyyy" /> |
118 | | - </div> |
119 | | - <div class="col-12 col-sm-6"> |
120 | | - <DateTimePicker @bind-Value="MonthValue" ShowLabel="true" DisplayText="Month" ViewMode="DatePickerViewMode.Month" DateFormat="yyyy-MM" /> |
121 | | - </div> |
122 | | - <div class="col-12 col-sm-6"> |
123 | | - <DateTimePicker @bind-Value="DateValue" ShowLabel="true" DisplayText="Date" ViewMode="DatePickerViewMode.Date" DateFormat="yyyy-MM-dd" /> |
124 | | - </div> |
125 | | - <div class="col-12 col-sm-6"> |
126 | | - <DateTimePicker @bind-Value="DateTimeValue" ShowLabel="true" DisplayText="DateTime" ViewMode="DatePickerViewMode.DateTime" DateTimeFormat="yyyy-MM-dd HH:mm:ss" /> |
127 | | - </div> |
128 | | - </div> |
| 114 | + <section ignore>@((MarkupString)Localizer["ViewModeTip"].Value)</section> |
| 115 | + <div class="row g-3"> |
| 116 | + <div class="col-12 col-sm-6"> |
| 117 | + <DateTimePicker @bind-Value="YearValue" ShowLabel="true" DisplayText="Year" ViewMode="DatePickerViewMode.Year" DateFormat="yyyy" /> |
| 118 | + </div> |
| 119 | + <div class="col-12 col-sm-6"> |
| 120 | + <DateTimePicker @bind-Value="MonthValue" ShowLabel="true" DisplayText="Month" ViewMode="DatePickerViewMode.Month" DateFormat="yyyy-MM" /> |
| 121 | + </div> |
| 122 | + <div class="col-12 col-sm-6"> |
| 123 | + <DateTimePicker @bind-Value="DateValue" ShowLabel="true" DisplayText="Date" ViewMode="DatePickerViewMode.Date" DateFormat="yyyy-MM-dd" /> |
| 124 | + </div> |
| 125 | + <div class="col-12 col-sm-6"> |
| 126 | + <DateTimePicker @bind-Value="DateTimeValue" ShowLabel="true" DisplayText="DateTime" ViewMode="DatePickerViewMode.DateTime" DateTimeFormat="yyyy-MM-dd HH:mm:ss" /> |
| 127 | + </div> |
| 128 | + </div> |
129 | 129 | </DemoBlock> |
130 | 130 |
|
131 | 131 | <DemoBlock Title="@Localizer["NullValueTitle"]" Introduction="@Localizer["NullValueIntro"]" Name="NullValue"> |
132 | | - <section ignore>@((MarkupString)Localizer["NullValueTip"].Value)</section> |
133 | | - <div class="row g-3"> |
134 | | - <div class="col-12 col-sm-8"> |
135 | | - <DateTimePicker @bind-Value="@BindNullValue" /> |
136 | | - </div> |
137 | | - <div class="col-12 col-sm-4"> |
138 | | - <Display TValue="string" Value="@GetNullValueString" /> |
139 | | - </div> |
140 | | - </div> |
| 132 | + <section ignore>@((MarkupString)Localizer["NullValueTip"].Value)</section> |
| 133 | + <div class="row g-3"> |
| 134 | + <div class="col-12 col-sm-8"> |
| 135 | + <DateTimePicker @bind-Value="@BindNullValue" /> |
| 136 | + </div> |
| 137 | + <div class="col-12 col-sm-4"> |
| 138 | + <Display TValue="string" Value="@GetNullValueString" /> |
| 139 | + </div> |
| 140 | + </div> |
141 | 141 | </DemoBlock> |
142 | 142 |
|
143 | 143 | <DemoBlock Title="@Localizer["ShowLabelTitle"]" Introduction="@Localizer["ShowLabelIntro"]" Name="ShowLabel"> |
144 | | - <section ignore class="mb-3"> |
145 | | - @((MarkupString)Localizer["ShowLabelTip"].Value) |
146 | | - </section> |
147 | | - <DateTimePicker ShowLabel="true" DisplayText="@Localizer["DisplayText"]" @bind-Value="@ShowLabelValue" /> |
| 144 | + <section ignore class="mb-3"> |
| 145 | + @((MarkupString)Localizer["ShowLabelTip"].Value) |
| 146 | + </section> |
| 147 | + <DateTimePicker ShowLabel="true" DisplayText="@Localizer["DisplayText"]" @bind-Value="@ShowLabelValue" /> |
148 | 148 | </DemoBlock> |
149 | 149 |
|
150 | 150 | <DemoBlock Title="@Localizer["DisabledTitle"]" Introduction="@Localizer["DisabledIntro"]" Name="IsDisabled"> |
151 | | - <div class="row g-3"> |
152 | | - <div class="col-12 col-sm-6"> |
153 | | - <DateTimePicker IsDisabled="IsDisabled" Value="DateTime.Today" /> |
154 | | - </div> |
155 | | - <div class="col-12 col-sm-6"> |
156 | | - <Switch @bind-Value="@IsDisabled" /> |
157 | | - </div> |
158 | | - </div> |
| 151 | + <div class="row g-3"> |
| 152 | + <div class="col-12 col-sm-6"> |
| 153 | + <DateTimePicker IsDisabled="IsDisabled" Value="DateTime.Today" /> |
| 154 | + </div> |
| 155 | + <div class="col-12 col-sm-6"> |
| 156 | + <Switch @bind-Value="@IsDisabled" /> |
| 157 | + </div> |
| 158 | + </div> |
159 | 159 | </DemoBlock> |
160 | 160 |
|
161 | 161 | <DemoBlock Title="@Localizer["ShowSidebarTitle"]" Introduction="@Localizer["ShowSidebarIntro"]" Name="ShowSidebar"> |
162 | | - <DateTimePicker ShowSidebar="true" @bind-Value="SidebarValue" /> |
| 162 | + <DateTimePicker ShowSidebar="true" @bind-Value="SidebarValue" /> |
163 | 163 | </DemoBlock> |
164 | 164 |
|
165 | 165 | <DemoBlock Title="@Localizer["MinValueTitle"]" Introduction="@Localizer["MinValueIntro"]" Name="MinValue"> |
166 | | - <DateTimePicker @bind-Value="@AllowValue" |
167 | | - MinValue="@(DateTime.Today.AddDays(1 - DateTime.Today.Day))" |
168 | | - MaxValue="@(DateTime.Today.AddDays(46 - DateTime.Today.Day))" /> |
| 166 | + <DateTimePicker @bind-Value="@AllowValue" |
| 167 | + MinValue="@(DateTime.Today.AddDays(1 - DateTime.Today.Day))" |
| 168 | + MaxValue="@(DateTime.Today.AddDays(46 - DateTime.Today.Day))" /> |
169 | 169 | </DemoBlock> |
170 | 170 |
|
171 | 171 | <DemoBlock Title="@Localizer["BlockAutoCloseTitle"]" Introduction="@Localizer["BlockAutoCloseIntro"]" Name="AutoClose"> |
172 | | - <section ignore class="mb-3"> |
173 | | - @((MarkupString)Localizer["BlockAutoCloseDesc"].Value) |
174 | | - </section> |
175 | | - <DateTimePicker @bind-Value="@AutoCloseValue" AutoClose="false" /> |
| 172 | + <section ignore class="mb-3"> |
| 173 | + @((MarkupString)Localizer["BlockAutoCloseDesc"].Value) |
| 174 | + </section> |
| 175 | + <DateTimePicker @bind-Value="@AutoCloseValue" AutoClose="false" /> |
176 | 176 | </DemoBlock> |
177 | 177 |
|
178 | 178 | <DemoBlock Title="@Localizer["BlockGroupTitle"]" Introduction="@Localizer["BlockGroupIntro"]" Name="Group"> |
179 | | - <div class="row g-3"> |
180 | | - <div class="col-12 col-sm-6"> |
181 | | - <BootstrapInputGroup> |
182 | | - <BootstrapInputGroupLabel DisplayText="@Localizer["BlockGroupLabel"]" /> |
183 | | - <DateTimePicker TValue="DateTime" ShowIcon="false" /> |
184 | | - </BootstrapInputGroup> |
185 | | - </div> |
186 | | - <div class="col-12 col-sm-6"> |
187 | | - <BootstrapInputGroup> |
188 | | - <DateTimePicker TValue="DateTime" /> |
189 | | - <BootstrapInputGroupLabel DisplayText="@Localizer["BlockGroupSuffixLabel"]" /> |
190 | | - </BootstrapInputGroup> |
191 | | - </div> |
192 | | - <div class="col-12 col-sm-6"> |
193 | | - <BootstrapInputGroup> |
194 | | - <BootstrapInputGroupLabel DisplayText="@Localizer["BlockGroupLabel"]" /> |
195 | | - <DateTimePicker TValue="DateTime" ShowIcon="false" /> |
196 | | - <BootstrapInputGroupLabel DisplayText="@Localizer["BlockGroupSuffixLabel"]" /> |
197 | | - </BootstrapInputGroup> |
198 | | - </div> |
199 | | - </div> |
| 179 | + <div class="row g-3"> |
| 180 | + <div class="col-12 col-sm-6"> |
| 181 | + <BootstrapInputGroup> |
| 182 | + <BootstrapInputGroupLabel DisplayText="@Localizer["BlockGroupLabel"]" /> |
| 183 | + <DateTimePicker TValue="DateTime" ShowIcon="false" /> |
| 184 | + </BootstrapInputGroup> |
| 185 | + </div> |
| 186 | + <div class="col-12 col-sm-6"> |
| 187 | + <BootstrapInputGroup> |
| 188 | + <DateTimePicker TValue="DateTime" /> |
| 189 | + <BootstrapInputGroupLabel DisplayText="@Localizer["BlockGroupSuffixLabel"]" /> |
| 190 | + </BootstrapInputGroup> |
| 191 | + </div> |
| 192 | + <div class="col-12 col-sm-6"> |
| 193 | + <BootstrapInputGroup> |
| 194 | + <BootstrapInputGroupLabel DisplayText="@Localizer["BlockGroupLabel"]" /> |
| 195 | + <DateTimePicker TValue="DateTime" ShowIcon="false" /> |
| 196 | + <BootstrapInputGroupLabel DisplayText="@Localizer["BlockGroupSuffixLabel"]" /> |
| 197 | + </BootstrapInputGroup> |
| 198 | + </div> |
| 199 | + </div> |
200 | 200 | </DemoBlock> |
201 | 201 |
|
202 | 202 | <DemoBlock Title="@Localizer["DayTemplateTitle"]" Introduction="@Localizer["DayTemplateIntro"]" Name="DayTemplate"> |
203 | | - <DateTimePicker TValue="DateTimeOffset?" CustomClass="custom-picker"> |
204 | | - <DayTemplate> |
205 | | - <span class="custom-cell"> |
206 | | - <span>@context.Day</span> |
207 | | - <span class="@GetMarkByDay(context)"></span> |
208 | | - </span> |
209 | | - </DayTemplate> |
210 | | - </DateTimePicker> |
| 203 | + <DateTimePicker TValue="DateTimeOffset ?" CustomClass="custom-picker"> |
| 204 | + <DayTemplate> |
| 205 | + <span class="custom-cell"> |
| 206 | + <span>@context.Day</span> |
| 207 | + <span class="@GetMarkByDay(context)"></span> |
| 208 | + </span> |
| 209 | + </DayTemplate> |
| 210 | + </DateTimePicker> |
211 | 211 | </DemoBlock> |
212 | 212 |
|
213 | 213 | <DemoBlock Title="@Localizer["DisableDayCallbackTitle"]" Introduction="@Localizer["DisableDayCallbackIntro"]" Name="OnDisabledDayCallback"> |
214 | | - <section ignore> |
215 | | - <Tips> |
216 | | - @((MarkupString)Localizer["DisableDayCallbackTip"].Value) |
217 | | - </Tips> |
218 | | - <GroupBox Title="@Localizer["DisableOptions"]"> |
219 | | - <div class="row g-3 form-inline text-end"> |
220 | | - <div class="col-12 col-sm-6 col-md-auto"> |
221 | | - <Switch DisplayText="@Localizer["DisableWeekend"]" ShowLabel="true" @bind-Value="_disableWeekend" OnValueChanged="OnDisabledDaysChanged" /> |
222 | | - </div> |
223 | | - <div class="col-12 col-sm-6 col-md-auto"> |
224 | | - <Switch DisplayText="@Localizer["DisableToday"]" ShowLabel="true" @bind-Value="_disableToday" OnValueChanged="OnDisabledDaysChanged" /> |
225 | | - </div> |
226 | | - </div> |
227 | | - </GroupBox> |
228 | | - </section> |
229 | | - <div class="row form-inline g-3"> |
230 | | - <div class="col-12 col-sm-6"> |
231 | | - <DateTimePicker ViewMode="DatePickerViewMode.DateTime" DisplayText="@Localizer["DisableDayCallbackAllowNullDisplayText"]" |
232 | | - ShowLabel="true" @bind-Value="@_disabledNullValue" @ref="_picker1" |
233 | | - OnGetDisabledDaysCallback="OnGetDisabledDaysCallback" DisplayDisabledDayAsEmpty="true"> |
234 | | - </DateTimePicker> |
235 | | - </div> |
236 | | - <div class="col-12 col-sm-6"> |
237 | | - <DateTimePicker ViewMode="DatePickerViewMode.DateTime" DisplayText="@Localizer["DisableDayCallbackNotAllowNullDisplayText"]" |
238 | | - ShowLabel="true" @bind-Value="@_disabledValue" @ref="_picker2" |
239 | | - OnGetDisabledDaysCallback="OnGetDisabledDaysCallback"> |
240 | | - </DateTimePicker> |
241 | | - </div> |
242 | | - </div> |
| 214 | + <section ignore> |
| 215 | + <Tips> |
| 216 | + @((MarkupString)Localizer["DisableDayCallbackTip"].Value) |
| 217 | + </Tips> |
| 218 | + <GroupBox Title="@Localizer["DisableOptions"]"> |
| 219 | + <div class="row g-3 form-inline text-end"> |
| 220 | + <div class="col-12 col-sm-6 col-md-auto"> |
| 221 | + <Switch DisplayText="@Localizer["DisableWeekend"]" ShowLabel="true" @bind-Value="_disableWeekend" OnValueChanged="OnDisabledDaysChanged" /> |
| 222 | + </div> |
| 223 | + <div class="col-12 col-sm-6 col-md-auto"> |
| 224 | + <Switch DisplayText="@Localizer["DisableToday"]" ShowLabel="true" @bind-Value="_disableToday" OnValueChanged="OnDisabledDaysChanged" /> |
| 225 | + </div> |
| 226 | + </div> |
| 227 | + </GroupBox> |
| 228 | + </section> |
| 229 | + <div class="row form-inline g-3"> |
| 230 | + <div class="col-12 col-sm-6"> |
| 231 | + <DateTimePicker ViewMode="DatePickerViewMode.DateTime" DisplayText="@Localizer["DisableDayCallbackAllowNullDisplayText"]" |
| 232 | + ShowLabel="true" @bind-Value="@_disabledNullValue" @ref="_picker1" |
| 233 | + OnGetDisabledDaysCallback="OnGetDisabledDaysCallback" DisplayDisabledDayAsEmpty="true"> |
| 234 | + </DateTimePicker> |
| 235 | + </div> |
| 236 | + <div class="col-12 col-sm-6"> |
| 237 | + <DateTimePicker ViewMode="DatePickerViewMode.DateTime" DisplayText="@Localizer["DisableDayCallbackNotAllowNullDisplayText"]" |
| 238 | + ShowLabel="true" @bind-Value="@_disabledValue" @ref="_picker2" |
| 239 | + OnGetDisabledDaysCallback="OnGetDisabledDaysCallback"> |
| 240 | + </DateTimePicker> |
| 241 | + </div> |
| 242 | + </div> |
243 | 243 | </DemoBlock> |
244 | 244 |
|
245 | 245 | <AttributeTable Items="@GetAttributes()" /> |
|
0 commit comments