syncfusion-maui-date-picker
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseImplementing Syncfusion .NET MAUI DatePicker (SfDatePicker)
实现Syncfusion .NET MAUI DatePicker(SfDatePicker)
Syncfusion .NET MAUI DatePicker (SfDatePicker) control allows you to select dates with a visually rich, customizable picker interface. The control supports dialog and drop-down modes, extensive customization options, date restrictions, formatting, localization, and accessibility features.
Syncfusion .NET MAUI DatePicker(SfDatePicker)控件允许您通过视觉丰富、可自定义的选择器界面选择日期。该控件支持对话框和下拉模式、丰富的自定义选项、日期限制、格式化、本地化以及辅助功能。
When to Use This Skill
何时使用此技能
Use this skill when you need to:
- Implement date selection - Add date picker controls to .NET MAUI applications
- Format dates - Display dates in various formats (20+ predefined options)
- Restrict date selection - Set minimum/maximum dates, blackout specific dates
- Customize appearance - Style headers, footers, column headers, selection views
- Handle date events - Respond to date selection, dialog open/close, OK/Cancel actions
- Configure picker modes - Use Dialog, RelativeDialog, or Default display modes
- Add intervals - Set day/month/year intervals for selection
- Enable accessibility - Support keyboard navigation and localization
- Apply modern effects - Implement liquid glass effect (.NET 10+)
当您需要以下操作时使用此技能:
- 实现日期选择 - 为.NET MAUI应用添加日期选择器控件
- 格式化日期 - 以多种格式显示日期(20+种预定义选项)
- 限制日期选择 - 设置最小/最大日期,禁用特定日期
- 自定义外观 - 设置页眉、页脚、列标题、选择视图的样式
- 处理日期事件 - 响应日期选择、对话框打开/关闭、确定/取消操作
- 配置选择器模式 - 使用Dialog、RelativeDialog或默认显示模式
- 添加间隔 - 设置日期选择的日/月/年间隔
- 启用辅助功能 - 支持键盘导航和本地化
- 应用现代效果 - 实现液态玻璃效果(.NET 10+)
Component Overview
组件概述
Key Capabilities:
- Date Selection - Interactive date picker with day, month, year columns
- Multiple Formats - 20+ predefined date formats (dd/MM/yyyy, MM/dd/yyyy, etc.)
- Picker Modes - Dialog, RelativeDialog with customizable positions
- Customization - Headers, footers, column headers, selection views, colors, fonts
- Date Restrictions - Min/max dates, blackout dates collection
- Intervals - Day, month, year intervals for custom date ranges
- Events & Commands - SelectionChanged, dialog events, footer button events
- Accessibility - Keyboard navigation, screen reader support, localization
- Advanced - Text display modes (Fade, Shrink), liquid glass effect
核心功能:
- 日期选择 - 包含日、月、年列的交互式日期选择器
- 多种格式 - 20+种预定义日期格式(dd/MM/yyyy、MM/dd/yyyy等)
- 选择器模式 - Dialog、RelativeDialog模式,支持自定义位置
- 自定义设置 - 页眉、页脚、列标题、选择视图、颜色、字体的自定义
- 日期限制 - 最小/最大日期、禁用日期集合
- 间隔设置 - 日、月、年间隔,用于自定义日期范围
- 事件与命令 - SelectionChanged事件、对话框事件、页脚按钮事件
- 辅助功能 - 键盘导航、屏幕阅读器支持、本地化
- 高级功能 - 文本显示模式(淡入、收缩)、液态玻璃效果
Documentation and Navigation Guide
文档与导航指南
Getting Started
入门指南
📄 Read: references/getting-started.md
- Installation and NuGet package setup
- Handler registration in MauiProgram.cs
- Basic DatePicker implementation (XAML & C#)
- Setting header, footer, height, width
- SelectedDate property and clear selection
📄 阅读: references/getting-started.md
- 安装与NuGet包设置
- 在MauiProgram.cs中注册处理程序
- 基础DatePicker实现(XAML & C#)
- 设置页眉、页脚、高度、宽度
- SelectedDate属性与清除选择
Date Formatting
日期格式化
📄 Read: references/formatting.md
- 20+ predefined date formats
- Format property usage
- Common format patterns (dd_MM_yyyy, MM_dd_yyyy, etc.)
- Custom format examples
📄 阅读: references/formatting.md
- 20+种预定义日期格式
- Format属性的使用
- 常见格式模式(dd_MM_yyyy、MM_dd_yyyy等)
- 自定义格式示例
Picker Modes and Display
选择器模式与显示
📄 Read: references/picker-modes.md
- Dialog mode (popup display)
- RelativeDialog mode (positioned relative to view)
- 8 relative positions (AlignTop, AlignBottom, etc.)
- IsOpen property for programmatic control
- Custom popup size (PopupWidth, PopupHeight)
📄 阅读: references/picker-modes.md
- Dialog模式(弹窗显示)
- RelativeDialog模式(相对于视图定位)
- 8种相对位置(AlignTop、AlignBottom等)
- IsOpen属性用于程序化控制
- 自定义弹窗尺寸(PopupWidth、PopupHeight)
Customization and Styling
自定义与样式设置
📄 Read: references/customizations.md
- Header customization (text, divider, background, template)
- Column header customization (day/month/year headers)
- Footer customization (OK/Cancel buttons)
- Selection view customization (corner radius, stroke, padding)
- Column divider colors
- Close button and icon
- Column-specific text styles and widths
- DataTemplateSelector support
📄 阅读: references/customizations.md
- 页眉自定义(文本、分隔线、背景、模板)
- 列标题自定义(日/月/年标题)
- 页脚自定义(确定/取消按钮)
- 选择视图自定义(圆角、描边、内边距)
- 列分隔线颜色
- 关闭按钮与图标
- 列特定文本样式与宽度
- DataTemplateSelector支持
Date Restrictions
日期限制
📄 Read: references/date-restrictions.md
- MinimumDate property
- MaximumDate property
- BlackoutDates collection
- Date range validation
- Preventing selection beyond ranges
📄 阅读: references/date-restrictions.md
- MinimumDate属性
- MaximumDate属性
- BlackoutDates集合
- 日期范围验证
- 防止选择超出范围的日期
Intervals and Looping
间隔与循环
📄 Read: references/intervals-and-looping.md
- DayInterval property
- MonthInterval property
- YearInterval property
- EnableLooping for seamless navigation
📄 阅读: references/intervals-and-looping.md
- DayInterval属性
- MonthInterval属性
- YearInterval属性
- EnableLooping用于无缝导航
Events and Commands
事件与命令
📄 Read: references/events-and-commands.md
- SelectionChanged event (NewValue, OldValue)
- Dialog mode events (Opened, Closing, Closed)
- Footer events (OkButtonClicked, CancelButtonClicked)
- SelectionChangedCommand, AcceptCommand, DeclineCommand
- Event handling patterns
📄 阅读: references/events-and-commands.md
- SelectionChanged事件(NewValue、OldValue)
- Dialog模式事件(Opened、Closing、Closed)
- 页脚事件(OkButtonClicked、CancelButtonClicked)
- SelectionChangedCommand、AcceptCommand、DeclineCommand
- 事件处理模式
Accessibility and Localization
辅助功能与本地化
📄 Read: references/accessibility-localization.md
- Accessibility features for headers, footers, picker items
- Keyboard navigation (Tab, Enter, Arrow keys)
- Localization setup and resource files
- CurrentUICulture configuration
- Multilingual support
📄 阅读: references/accessibility-localization.md
- 页眉、页脚、选择器项的辅助功能
- 键盘导航(Tab、Enter、方向键)
- 本地化设置与资源文件
- CurrentUICulture配置
- 多语言支持
Advanced Features
高级功能
📄 Read: references/advanced-features.md
- Text display modes (Default, Fade, Shrink, FadeAndShrink)
- Liquid glass effect integration
- SfGlassEffectView setup
- EnableLiquidGlassEffect property
- Platform requirements (.NET 10, macOS 26+, iOS 26+)
📄 阅读: references/advanced-features.md
- 文本显示模式(默认、淡入、收缩、淡入并收缩)
- 液态玻璃效果集成
- SfGlassEffectView设置
- EnableLiquidGlassEffect属性
- 平台要求(.NET 10、macOS 26+、iOS 26+)