Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(module: datepicker): value not updated when changed programmatically #2551

Conversation

Alexbits
Copy link
Contributor

@Alexbits Alexbits commented Jul 2, 2022

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • Bundle size optimization
  • Performance optimization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

#2538

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Changelog is provided or not needed

@github-actions
Copy link

github-actions bot commented Jul 2, 2022

@Alexbits
Copy link
Contributor Author

Alexbits commented Jul 2, 2022

This PR should fix the issue with DatePicker. The RangePicker has the same problem, but it's more complex. I'm still working on fixing it.

@codecov
Copy link

codecov bot commented Jul 2, 2022

Codecov Report

Merging #2551 (1e1ed16) into feature (26ff941) will increase coverage by 2.30%.
The diff coverage is 63.63%.

@@             Coverage Diff             @@
##           feature    #2551      +/-   ##
===========================================
+ Coverage    27.34%   29.64%   +2.30%     
===========================================
  Files          503      541      +38     
  Lines        33956    26150    -7806     
  Branches         0      260     +260     
===========================================
- Hits          9284     7752    -1532     
+ Misses       24672    18358    -6314     
- Partials         0       40      +40     
Impacted Files Coverage Δ
components/calendar/Calendar.razor.cs 0.00% <0.00%> (ø)
...s/date-picker/internal/DatePickerTemplate.razor.cs 32.86% <0.00%> (+3.69%) ⬆️
...onents/date-picker/internal/DatePickerPanelBase.cs 55.43% <5.88%> (+13.89%) ⬆️
components/date-picker/internal/DatePickerBase.cs 51.92% <92.00%> (+10.05%) ⬆️
components/date-picker/DatePicker.Razor.cs 63.97% <100.00%> (+0.50%) ⬆️
components/date-picker/RangePicker.razor.cs 25.77% <100.00%> (+25.77%) ⬆️
components/core/Helpers/MemberPath/PathNode.cs 46.15% <0.00%> (-8.85%) ⬇️
components/core/Reflection/TypeDefined.cs 77.77% <0.00%> (-7.94%) ⬇️
components/input/InputGroup.razor.cs 87.50% <0.00%> (-6.95%) ⬇️
...ponents/date-picker/types/DatePickerPlaceholder.cs 22.72% <0.00%> (-4.20%) ⬇️
... and 448 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 26ff941...1e1ed16. Read the comment docs.

@ElderJames
Copy link
Member

Thanks @Alexbits , maybe this PR can be target to branch master.

@Alexbits
Copy link
Contributor Author

Alexbits commented Jul 2, 2022

Thanks @Alexbits , maybe this PR can be target to branch master.

I wanted to commit RangePicker fixes here. But it's up to you of course. This fix also requires the previous changes from the feature branch.

@ElderJames
Copy link
Member

That's fine. Just let it stay at feature.

@Alexbits
Copy link
Contributor Author

Alexbits commented Jul 2, 2022

That's fine. Just let it stay at feature.

I believe this fixes RangePicker. It looks like I also found a bug when the left part (marked red on the screenshot) of the date selection panel always set the value to the picker with index 0, no matter that the 1 was active input 🤔.

image

@ElderJames
Copy link
Member

I believe this fixes RangePicker. It looks like I also found a bug when the left part (marked red on the screenshot) of the date selection panel always set the value to the picker with index 0, no matter that the 1 was active input 🤔.

Yes, I found this. I take it you haven't fixed the bug yet.

@Alexbits
Copy link
Contributor Author

Alexbits commented Jul 7, 2022

I believe this fixes RangePicker. It looks like I also found a bug when the left part (marked red on the screenshot) of the date selection panel always set the value to the picker with index 0, no matter that the 1 was active input 🤔.

Yes, I found this. I take it you haven't fixed the bug yet.

Hey @ElderJames I fixed it in the last commit.

@ElderJames ElderJames merged commit c00dd6f into ant-design-blazor:feature Jul 10, 2022
ElderJames pushed a commit that referenced this pull request Sep 6, 2022
…lly (#2551)

* fix(module: datepicker): value not updated when changed programmatically

* fix(module: rangepicker): value not updated when set programmatically

* fix:(module: datepicker): placeholder attribute not applied to input

* fix:(module: rangepicker): end date placeholder is not cleared
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants