Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计通过

syncfusion-angular-datetimepickersyncfusion Angular datetimepicker 命令行

Agent Skill

syncfusion-angular-datetimepicker 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

661

周安装

27

GitHub Stars

公开资料未说明

下载量

212
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:syncfusion-angular-datetimepicker(syncfusion Angular datetimepicker 命令行)
来源仓库:https://github.com/syncfusion/angular-ui-components-skills
仓库路径:skills/syncfusion-angular-datetimepicker
安装命令:
npx skills add https://github.com/syncfusion/angular-ui-components-skills --skill syncfusion-angular-datetimepicker
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/syncfusion/angular-ui-components-skills --skill syncfusion-angular-datetimepicker

简介

集成日期时间联合选择器,同时处理日期与时分秒输入。syncfusion-angular-datetimepicker 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

  • 适用于会议安排、日志查询等精细时间控制的需求场景。
  • 通过 GitHub 仓库安装,使用 npx 命令添加技能并指定路径。
  • 移动端应弹出原生时间滚轮,提升输入便捷性与准确性。
  • 保存前应将本地时间转为 UTC 再传输,确保跨时区一致性。

SKILL.md

Implementing Syncfusion Angular DatetimePicker

A comprehensive guide for implementing the Syncfusion Essential JS 2 DatetimePicker component in Angular applications. Learn to create date and time selection interfaces, manage calendars and time pickers, handle events, and customize styling.

DatetimePicker Overview

The Syncfusion Angular DatetimePicker component is a combined date and time selection widget that provides:

  • Integrated Date & Time Selection: Calendar popup for dates + time picker dropdown for time selection
  • Flexible Formatting: Custom date formats, time formats, and locale-aware formatting
  • Calendar Views: Month (default), Year, and Decade views with smooth navigation
  • Time Intervals: Configurable step intervals (15, 30, 60 minutes, etc.) for time selection
  • Range Constraints: Min/max dates and min/max time with strict validation
  • Comprehensive Event System: change, focus, blur, open, close, created, destroyed, navigated, renderDayCell events
  • Masked Input Support: Optional masked input format for guided user entry
  • Persistence & RTL: State persistence across reloads and right-to-left language support
  • Advanced Features: Strict mode validation, floating labels, keyboard customization, timezone support
  • Accessibility: Full WCAG 2.2 compliance, keyboard navigation, WAI-ARIA support
  • Theme Support: Material, Bootstrap, Tailwind, Fabric with light/dark variants
  • Mobile Optimized: Full screen mode on mobile devices, touch-friendly interface

Package: @syncfusion/ej2-angular-datetimepickers

Documentation Navigation

Read the following references based on your specific needs:

Getting Started

📄 Read: references/getting-started.md

  • Package installation via npm and ng add
  • NgModule vs Standalone component setup
  • CSS theme imports and dependencies
  • Basic datetimepicker implementation
  • Component initialization and running the application
  • Development server setup

Basic Implementation

📄 Read: references/basic-implementation.md

  • Simple datetime picker with ngModel
  • Two-way data binding patterns
  • Readonly and disabled states
  • Basic validation and constraints
  • Event handling fundamentals
  • ViewChild component access

Date & Time Configuration

📄 Read: references/date-time-configuration.md

  • Date format customization (format property)
  • Time format configuration (timeFormat property)
  • ISO date string handling
  • Date range constraints (min/max dates)
  • Time range constraints (minTime/maxTime)
  • Parsing multiple input formats (inputFormats)

Calendar & Time Views

📄 Read: references/calendar-and-time-views.md

  • Calendar view modes (month, year, decade)
  • Start and depth properties for view control
  • Time picker popup configuration
  • Time step intervals and granularity
  • ScrollTo position for time scrolling
  • Today button and clear button behavior

Events & Callbacks

📄 Read: references/events-and-callbacks.md

  • Change event with ChangedEventArgs
  • Focus/blur event handling
  • Open/close popup events
  • Created/destroyed lifecycle events
  • Navigate event for calendar navigation
  • RenderDayCell for custom day styling
  • Cleared event when clear button is used

Methods & Imperative Access

📄 Read: references/methods-and-imperative-access.md

  • ViewChild access and component references
  • currentView() to get active calendar view
  • navigateTo() for programmatic navigation
  • focusIn/focusOut for focus management
  • destroy() for cleanup and resource release
  • getPersistData() for state persistence

Advanced Features

📄 Read: references/advanced-features.md

  • Masked input mode with mask placeholders
  • State persistence across page reloads
  • RTL (Right-to-Left) language support
  • Floating label types and behavior
  • Strict mode validation and error states
  • Keyboard shortcuts and key configuration
  • Timezone offset handling
  • Full screen mode for mobile devices
  • Clear button visibility and behavior

Styling & Customization

📄 Read: references/styling-and-customization.md

  • CSS class customization (cssClass property)
  • Theme selection and switching
  • Dark mode implementation
  • Component width and z-index configuration
  • HTML attribute injection (htmlAttributes)
  • Calendar mode selection (Gregorian vs Islamic)
  • Day header format options
  • Disabled dates and styling states

Accessibility & Globalization

📄 Read: references/accessibility-and-globalization.md

  • WCAG 2.2 and Section 508 compliance standards
  • WAI-ARIA attributes and roles
  • Keyboard navigation (arrows, enter, space, escape)
  • Screen reader compatibility and announcements
  • Localization and locale property usage
  • Day header format variations
  • First day of week customization
  • Week numbers and week rules
  • RTL text direction support

API Reference

📄 Read: references/api-reference.md

  • Complete property reference with types and defaults
  • All method signatures with parameters and return types
  • All events with event argument types
  • Property descriptions and use cases
  • Method examples and common patterns
  • Type interfaces and enums
  • Key configuration for keyboard shortcuts
  • Comprehensive property-by-property guide

Quick Start Example

// app.component.ts
import { Component } from '@angular/core';
import { ChangedEventArgs } from '@syncfusion/ej2-datetimepickers';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  // Simple datetime value
  dateTimeValue: Date = new Date();

  // Configuration
  minDate: Date = new Date(2020, 0, 1);
  maxDate: Date = new Date(2030, 11, 31);
  dateFormat: string = 'dd/MM/yyyy hh:mm a';
  timeFormat: string = 'hh:mm a';

  // Event handler
  onDateTimeChange(args: ChangedEventArgs): void {
    console.log('Selected DateTime:', args.value);
    console.log('Event Type:', args.type);
  }

  onPopupOpen(): void {
    console.log('Popup opened');
  }

  onPopupClose(): void {
    console.log('Popup closed');
  }
}
<!-- app.component.html -->
<div style="padding: 20px;">
  <h2>Select Date & Time</h2>

  <ejs-datetimepicker
    id="datetimepicker"
    [value]="dateTimeValue"
    [format]="dateFormat"
    [timeFormat]="timeFormat"
    [min]="minDate"
    [max]="maxDate"
    placeholder="Select date and time"
    (change)="onDateTimeChange($event)"
    (open)="onPopupOpen()"
    (close)="onPopupClose()">
  </ejs-datetimepicker>

  <p *ngIf="dateTimeValue">
    Selected: {{ dateTimeValue | date:'medium' }}
  </p>
</div>

Common Patterns

Pattern 1: Datetime Range Selection

Select a start and end datetime for appointments, bookings, or events:

export class AppComponent {
  startDateTime: Date = new Date();
  endDateTime: Date = new Date(Date.now() + 3600000); // +1 hour

  onStartChange(args: ChangedEventArgs): void {
    // Ensure end is after start
    if (this.endDateTime <= args.value) {
      this.endDateTime = new Date((args.value as Date).getTime() + 3600000);
    }
  }
}

Pattern 2: Business Hours Only

Restrict time selection to business hours (9 AM - 5 PM):

export class AppComponent {
  minTime: Date = new Date(2026, 2, 24, 9, 0);  // 9:00 AM
  maxTime: Date = new Date(2026, 2, 24, 17, 0); // 5:00 PM

  datetimeValue: Date = new Date(2026, 2, 24, 10, 0);
}
<ejs-datetimepicker
  [value]="datetimeValue"
  [minTime]="minTime"
  [maxTime]="maxTime"
  timeFormat="hh:mm a">
</ejs-datetimepicker>

Pattern 3: Masked Input for Guided Entry

Use masked input to guide users through the datetime format:

export class AppComponent {
  datetimeValue: Date;
  maskPlaceholder = {
    day: 'dd',
    month: 'mm',
    year: 'yyyy',
    hour: 'hh',
    minute: 'mm',
    second: 'ss'
  };
}
<ejs-datetimepicker
  [value]="datetimeValue"
  [enableMask]="true"
  [maskPlaceholder]="maskPlaceholder"
  format="dd/MM/yyyy hh:mm:ss">
</ejs-datetimepicker>

Pattern 4: Reactive Forms Integration

Integrate datetimepicker with Angular Reactive Forms:

import { FormBuilder, FormGroup, Validators } from '@angular/forms';

export class AppComponent {
  appointmentForm: FormGroup;

  constructor(private fb: FormBuilder) {
    this.appointmentForm = this.fb.group({
      appointmentDateTime: [
        new Date(),
        [Validators.required]
      ]
    });
  }

  submitForm(): void {
    if (this.appointmentForm.valid) {
      console.log(this.appointmentForm.value);
    }
  }
}
<form [formGroup]="appointmentForm">
  <ejs-datetimepicker
    formControlName="appointmentDateTime"
    format="dd/MM/yyyy hh:mm a">
  </ejs-datetimepicker>

  <button (click)="submitForm()" [disabled]="!appointmentForm.valid">
    Submit
  </button>
</form>

Pattern 5: Disabled Dates

Disable weekends and specific dates:

export class AppComponent {
  datetimeValue: Date;

  onRenderDayCell(args: RenderDayCellEventArgs): void {
    // Disable weekends (0 = Sunday, 6 = Saturday)
    if ((args.date as Date).getDay() === 0 || (args.date as Date).getDay() === 6) {
      args.isDisabled = true;
    }

    // Disable specific dates
    const disabledDates = [5, 15, 25]; // 5th, 15th, 25th of each month
    if (disabledDates.includes((args.date as Date).getDate())) {
      args.isDisabled = true;
    }
  }
}
<ejs-datetimepicker
  [value]="datetimeValue"
  (renderDayCell)="onRenderDayCell($event)">
</ejs-datetimepicker>

Key Properties Reference

PropertyTypePurpose
valueDateSelected datetime value for two-way binding
formatstringDate display format (e.g., 'dd/MM/yyyy hh:mm a')
timeFormatstringTime display format in popup (e.g., 'hh:mm a')
minDateMinimum selectable date
maxDateMaximum selectable date
minTimeDateMinimum selectable time
maxTimeDateMaximum selectable time
stepnumberTime interval in minutes (15, 30, 60)
enabledbooleanEnable/disable the component
readonlybooleanMake input readonly (select from popup only)
placeholderstringPlaceholder text in input
enableMaskbooleanEnable masked input mode
strictModebooleanEnforce valid values only
enableRtlbooleanRight-to-left language support
enablePersistencebooleanPersist value across page reloads
startCalendarViewInitial calendar view (Month/Year/Decade)
depthCalendarViewMaximum calendar view level
localestringLocale for formatting (e.g., 'en-US', 'de-DE')

Common Use Cases

Appointment Booking System

  • Use date range selection with business hours time constraints
  • Display available time slots based on min/max time
  • Handle form validation with required validators
  • Show selected datetime confirmation

Event Scheduling

  • Select start and end datetimes for events
  • Disable weekend dates with renderDayCell
  • Use step intervals for common durations (30, 60 min)
  • Format output for API submission

Shift Management

  • Select shift start and end times
  • Apply shift time constraints (min/max time)
  • Handle date transitions (shifts spanning midnight)
  • Support multiple timezone offsets

Billing & Invoicing

  • Select invoice date and time
  • Restrict to past dates only
  • Display in user's locale format
  • Export with ISO format

Next Steps

  1. Start with Getting Started → Install and configure the component
  2. Build Basic Implementation → Create simple datetime pickers
  3. Add Event Handling → Respond to user interactions
  4. Implement Advanced Features → Add masked input, persistence, RTL
  5. Customize Appearance → Apply themes and custom styles
  6. Ensure Accessibility → Support keyboard and screen readers
  7. Reference API → Consult complete API documentation as needed

Ready to get started? Begin with references/getting-started.md for installation and setup instructions.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.54%
按下载量换算80

Claude

30.56%
按下载量换算65

Cursor

18.53%
按下载量换算39

Gemini CLI

8.46%
按下载量换算18

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills