DatePicker in .NET MAUI 是否有 BlackoutDates 或类似功能?

huangapple go评论69阅读模式
英文:

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,只有这两个属性:MinimumDateMaximumDate"

<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.

huangapple
  • 本文由 发表于 2023年6月5日 02:01:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/76401746.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定