Repository navigation
Conversation
Reviewer's GuideUpdates the DateTimePicker documentation sample with localized guidance and live controls for IsButton and PickTimeMode, wiring both options into the component and defaulting to clock mode. The PR also normalizes affected unordered-list markup from demo-ul to ul-demo and removes an unused using directive. File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8673 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 776 776
Lines 35248 35248
=========================================
Hits 35248 35248
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor" line_range="19" />
<code_context>
+ <BootstrapInputGroup>
+ <BootstrapInputGroupLabel DisplayText="@Localizer["DateTimePickerIsButtonLabel"]"></BootstrapInputGroupLabel>
+ <Switch @bind-Value="_isButton"></Switch>
+ </BootstrapInputGroup>
+ </div>
+ <div class="col-12 col-sm-6">
</code_context>
<issue_to_address>
**Changing options discards pending date**
When the user changes either sample option while a date/time selection is still unconfirmed, the control binding rerenders the picker, and `DateTimePicker.OnParametersSet` reloads `SelectedValue` from the unchanged external `Value`; `DatePickerBody.OnParametersSet` then resets its draft date and time from that value, so the user's unconfirmed selection is lost.
Preserve the picker draft when unrelated parameters change, or avoid rerendering/resetting the picker draft for these option updates.
Also at `src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor:24`.
</issue_to_address>Linked issues
#8672 doc(DateTimePicker): update IsButton/PickTimeMode sample · 1 of 1 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Add sample code for the DateTimePicker component. | ✅ Met | The DateTimePickers sample now demonstrates interactive IsButton and PickTimeMode options. |
Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor:19
| <BootstrapInputGroup> | ||
| <BootstrapInputGroupLabel DisplayText="@Localizer["DateTimePickerIsButtonLabel"]"></BootstrapInputGroupLabel> | ||
| <Switch @bind-Value="_isButton"></Switch> | ||
| </BootstrapInputGroup> |
There was a problem hiding this comment.
🟡 Medium · Changing options discards pending date
When the user changes either sample option while a date/time selection is still unconfirmed, the control binding rerenders the picker, and DateTimePicker.OnParametersSet reloads SelectedValue from the unchanged external Value; DatePickerBody.OnParametersSet then resets its draft date and time from that value, so the user's unconfirmed selection is lost.
Preserve the picker draft when unrelated parameters change, or avoid rerendering/resetting the picker draft for these option updates.
Also at src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor:24.
Prompt for AI agents
In `src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor` at line 19:
**Changing options discards pending date**
When the user changes either sample option while a date/time selection is still unconfirmed, the control binding rerenders the picker, and `DateTimePicker.OnParametersSet` reloads `SelectedValue` from the unchanged external `Value`; `DatePickerBody.OnParametersSet` then resets its draft date and time from that value, so the user's unconfirmed selection is lost.
Preserve the picker draft when unrelated parameters change, or avoid rerendering/resetting the picker draft for these option updates.
Also at `src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor:24`.* doc: 完善说明 * doc: 更新样式 # Conflicts: # src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor
Link issues
fixes #8672
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Improve the DateTimePicker documentation sample by showcasing configurable button and time-selection modes.
New Features:
Enhancements:
Documentation: