英文:
Is there BlackoutDates or something similar for DatePicker in .NET MAUI?
问题
在WinForms和WPF中,我们可以使用BlackoutDates来阻止DatePicker中的某些日期。我可以看到在.NET MAUI中没有类似的东西。有没有解决方案?
我已经在.NET MAUI中搜索了类似的内容,但找不到任何东西。
英文:
In WinForms and WPF, we can use BlackoutDates to block certain dates in the DatePicker. I can see that there is nothing similar in .NET MAUI. Is there any solution for this?
I have searched for something similar in .NET MAUI and I cannot find anything.
答案1
得分: 0
"Jason和ToolmakerSteve表示,在MAUI中没有BlackoutDates这样的功能。对于MAUI,只有这两个属性:MinimumDate
和MaximumDate
"
<DatePicker MinimumDate="2023-06-01" MaximumDate="2023-06-09"/>
并且这是效果。
更新:
根据salman_sali的说法,为MAUI创建一个自定义日期选择器组件是在特定日期和星期几上进行遮蔽的一种方式。
英文:
As Jason and ToolmakerSteve said that, there is nothing like BlackoutDates in MAUI. For MAUI, only these two properties: MinimumDate
MaximumDate
<DatePicker MinimumDate="2023-06-01" MaximumDate="2023-06-09"/>
And this is the effect.
Update:
According to salman_sali, creating a custom date picker component is a way to blackout certain individual dates and certain DaysOfWeek for MAUI.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论