dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.05k stars 1.73k forks source link

DatePicker's Minimumdate and Maximumdate do not work on MacCatalyst #16224

Open dlent1 opened 1 year ago

dlent1 commented 1 year ago

Description

DatePicker's minimumdate and maximumdate do not work on MacCatalyst. You are still about to select dates less than the minimum date and dates higher than the maximum date. These work on IOS though. I am using Visual Studio for Mac 17.6.1

Steps to Reproduce

1) Put this datepicker in your app: <DatePicker MinimumDate="01/01/2023" MaximumDate="12/31/2025" Date="12/12/2023" HorizontalOptions="Center"/> 2) Click debug targeting MacCatalyst 3) Try to enter a date less than the minimum date and notice that it lets you when it should not. 4) Try to enter a date greater than the maximum date and notice that it lets you when it should not.

Link to public reproduction project repository

https://github.com/dlent1/DatePickerBug

Version with bug

7.0.49

Last version that worked well

6.0

Affected platforms

macOS

Affected platform versions

MacOs Ventura Version 13.2.1

Did you find any workaround?

no

Relevant log output

No response

drasticactions commented 1 year ago
スクリーンショット 2023-07-19 18 40 17

I don't think this is a MAUI UI bug.

https://github.com/drasticactions/MauiRepros/tree/main/DatePickerTest

You can reproduce this behavior when building a Mac Catalyst app directly without using the MAUI UI Framework. On iOS it limits the correct date range, but on Catalyst it fails to. I would need to build a Swift/ObjC app to verify if it's broken on the framework itself, although maybe it could be an SDK issue, but that seems unlikely. @rolfbjarne What do you think?

rolfbjarne commented 1 year ago

@rolfbjarne What do you think?

This sounds like something in macOS / Mac Catalyst, and nothing we're doing (as you said, an Xcode project would confirm this).

XamlTest commented 10 months ago

Verified this on Visual Studio Enterprise 17.9.0 Preview 1(8.0.3). Repro on MacCatalyst, not repro on Windows 11, Android 14.0-API34 and iOS 17.0 with below Project: DatePickerBug.zip