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

Nullable TimePicker (make Time nullable) #27930

Draft
wants to merge 4 commits into
base: net10.0
Choose a base branch
from

Conversation

jfversluis
Copy link
Member

@jfversluis jfversluis commented Feb 20, 2025

Description of Change

The long awaited feature of making the Time property of the TimePicker class nullable has been implemented!

Changes

  • TimeSpan TimePicker.Time -> TimeSpan? TimePicker.Time
  • Minor code styling and API docs changes

In #1100 it is proposed to also make the type TIme, while I like that, unfortunately that type is not available in netstandard so that would cause a lot of duplication of code and not great APIs and might even just be impossible because of that to make the XAML parsing and design time tooling work.

Instead, I think we should take #21989 in addition to this to still allow people to use TimeOnly (and DateOnly).

Issues Fixed

Contributes to #1100 (DatePicker PR in #27921)

Copy link
Contributor

🚨 API change(s) detected @davidbritch FYI

Copy link
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you take a look to it?

D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\NotifiedPropertiesTests.cs(148,61): error CS0266: Cannot implicitly convert type 'System.TimeSpan?' to 'System.TimeSpan'. An explicit conversion exists (are you missing a cast?) [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\NotifiedPropertiesTests.cs(148,61): error CS1662: Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
    7727 Warning(s)
    2 Error(s)

@dotnet dotnet deleted a comment from azure-pipelines bot Feb 21, 2025
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.

2 participants