用途:本资料是 Syncfusion Essential JS 2 DateTimePicker 组件在 Angular 应用中的实现指南,用于构建同时选择日期与时间的输入控件。
主要能力:日历弹窗加时间选择下拉;自定义日期与时间格式及区域化格式;月、年、十年日历视图;可配置时间步长(15、30、60 分钟等);最小/最大日期与最小/最大时间约束;change、focus、blur、open、close、created、destroyed、navigated、renderDayCell 等事件;可选掩码输入;状态持久化与 RTL;严格模式、浮动标签、键盘自定义、时区支持;WCAG 2.2 与 WAI-ARIA 无障碍;Material、Bootstrap、Tailwind、Fabric 主题及明暗变体;移动端全屏模式。
使用方式:包名为 @syncfusion/ej2-angular-datetimepickers,可通过 npm 或 ng add 安装,支持 NgModule 与独立组件两种配置,需导入 CSS 主题。模板中使用 <ejs-datetimepicker>,可绑定 value、format、timeFormat、min、max、minTime、maxTime、step、enableMask、strictMode、enableRtl、enablePersistence、start、depth、locale 等属性,并监听 change、open、close、renderDayCell 等事件。可通过 ViewChild 调用 currentView()、navigateTo()、focusIn/focusOut、destroy()、getPersistData() 等方法。资料给出预约、事件排期、班次管理、账单等常见模式,以及与响应式表单集成、禁用周末日期的示例。
限制:资料未提供具体收费、价格、平台兼容版本或性能数据,这些事实暂未提供。