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

syncfusion-angular-datepickersyncfusion Angular datepicker 命令行

Agent Skill

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

总安装

654

周安装

27

GitHub Stars

公开资料未说明

下载量

214
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

创建日期选择器组件,支持日历弹窗与快捷选项预设。syncfusion-angular-datepicker 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

  • 适用于注册表单、报表筛选等需要精确时间输入的场景。
  • 通过 GitHub 仓库安装,使用 npx 命令添加技能并指定路径。
  • 需兼容 IE11 等老旧浏览器,必要时引入 polyfill 垫片。
  • 国际化时应替换默认语言包,适配本地节假日与周起始日。

SKILL.md

Implementing Syncfusion Angular DatePicker

The Syncfusion Angular DatePicker provides a user-friendly calendar interface for selecting individual dates with support for formatting, validation, date ranges, and complete accessibility (WCAG 2.2). This skill guides you through all essential implementation patterns and advanced features.

Component Overview

The DatePicker combines a text input with a popup calendar picker. Users can type dates directly or use the calendar to select. Key capabilities:

  • Date selection via calendar UI or text input
  • Multiple date formats (culture-aware, custom patterns)
  • Date range validation (min/max, strict mode)
  • Input masking for guided date entry
  • Multiple calendar views (month → year → decade navigation)
  • Accessibility (WCAG 2.2, ARIA, keyboard support, RTL)
  • Internationalization (CLDR data, 100+ cultures)
  • Form integration (FormValidator, reactive forms, template-driven forms)

Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md

  • Installation and setup for Angular 21+ standalone architecture
  • Package dependencies and imports
  • Basic DatePicker implementation
  • CSS theme imports
  • Minimal working example

Date Formats and Parsing

📄 Read: references/date-formats-and-parsing.md

  • Standard date format patterns (yyyy-MM-dd, dd/MM/yyyy, etc.)
  • Culture-specific default formats
  • Custom date format creation
  • parseDate and formatDate methods
  • Dynamic format switching

Date Range and Validation

📄 Read: references/date-range-and-validation.md

  • Setting date range constraints (min/max properties)
  • Out-of-range date handling and error states
  • Null date validation and strictMode
  • Invalid date detection
  • Real-world date constraint patterns

Date Views and Navigation

📄 Read: references/date-views-and-navigation.md

  • Start view configuration (month/year/decade)
  • Depth view restrictions for limited selection
  • Navigating between calendar views
  • Month and year selection patterns
  • Use cases for different view configurations

Masking and Editing

📄 Read: references/masking-and-editing.md

  • Enabling date input masking for guided entry
  • Mask patterns based on date format
  • Keyboard navigation in masked input (up/down/left/right arrows)
  • Custom mask placeholders
  • Locale-aware mask placeholder text

Styling and Customization

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

  • CSS customization for wrapper and input elements
  • DatePicker icon styling and customization
  • Full-screen mode on mobile devices
  • Placeholder and readonly state customization
  • Dark mode and Theme Studio integration

Accessibility and Forms

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

  • WCAG 2.2 compliance and accessibility standards
  • ARIA attributes (aria-expanded, aria-disabled, aria-activedescendant)
  • Keyboard navigation support (arrow keys, Enter, Escape)
  • Screen reader support and semantic markup
  • FormValidator integration for date validation
  • Reactive forms and template-driven forms patterns
  • Custom validation rules

Globalization and Localization

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

  • CLDR data loading for culture-specific formatting
  • Culture-aware date parsing and formatting
  • Locale configuration and L10n setup
  • First day of week by culture (week data)
  • Right-to-Left (RTL) language support
  • Multi-language examples
  • Timezone-aware date handling

Testing & Quality Assurance

📄 Read: references/testing-guide.md

  • Unit testing with Jasmine/Karma: parsing, validators, events
  • E2E testing with Cypress: calendar interactions, form flows
  • Accessibility testing with axe-core and keyboard navigation checks

Advanced Patterns

📄 Read: references/advanced-patterns.md

  • Cascading date pickers (dependent availability)
  • Dynamic date ranges driven by business logic
  • Blackout/unavailable dates and recurring date handling
  • Testing and validation patterns for advanced scenarios

Quick Start Example

Basic DatePicker implementation in Angular 21+ standalone component:

import { Component } from '@angular/core';
import { DatePickerModule } from '@syncfusion/ej2-angular-calendars';

@Component({
  selector: 'app-datepicker-demo',
  standalone: true,
  imports: [DatePickerModule],
  template: `
    <ejs-datepicker
      placeholder="Select date"
      [(ngModel)]="selectedDate"
      (change)="onDateChange($event)">
    </ejs-datepicker>
    <p>Selected: {{ selectedDate | date:'fullDate' }}</p>
  `
})
export class DatePickerDemoComponent {
  selectedDate: Date | null = null;

  onDateChange(event: any) {
    console.log('Date changed:', event.value);
  }
}

Setup Steps:

  1. Install @syncfusion/ej2-angular-calendars package
  2. Import DatePickerModule in component
  3. Add <ejs-datepicker> element with properties
  4. Bind to component variable with [(ngModel)] (two-way binding)

What happens:

  • DatePicker displays with calendar icon
  • Click to open popup calendar
  • Select date from calendar or type directly
  • Selected date updates component variable
  • change event fires on date selection

Common Patterns

1. Date Range Validation

Restrict user to select dates between specific start and end dates:

minDate = new Date(2024, 0, 1);  // Jan 1, 2024
maxDate = new Date(2024, 11, 31); // Dec 31, 2024
<ejs-datepicker
  [min]="minDate"
  [max]="maxDate"
  placeholder="Select date in 2024">
</ejs-datepicker>

Use case: Flight booking, hotel reservations, appointment scheduling

2. Custom Date Format

Display dates in application-specific format:

dateFormat = 'dd/MM/yyyy';  // European format
<ejs-datepicker
  [format]="dateFormat"
  placeholder="DD/MM/YYYY">
</ejs-datepicker>

3. Masked Date Input

Guide user with visual masks and arrow key navigation:

<ejs-datepicker
  [enableMask]="true"
  [maskPlaceholder]="'day'"
  format="dd/MM/yyyy">
</ejs-datepicker>

Keyboard navigation: Up/Down arrows increment/decrement segments, Left/Right navigate between segments

4. Date Range Selection (With Min/Max)

Prevent past dates in booking scenarios:

minDate = new Date(); // Today
maxDate: Date;

constructor() {
  // Set max to 90 days from today
  this.maxDate = new Date();
  this.maxDate.setDate(this.maxDate.getDate() + 90);
}

5. Reactive Forms Integration

DatePicker with reactive form validation:

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

export class FormComponent {
  form = this.fb.group({
    birthDate: [null, [Validators.required]],
  });

  constructor(private fb: FormBuilder) {}
}
<form [formGroup]="form">
  <ejs-datepicker
    formControlName="birthDate"
    placeholder="Birth date">
  </ejs-datepicker>
  <span *ngIf="form.get('birthDate')?.hasError('required')">
    Birth date is required
  </span>
</form>

API Reference (Properties, Methods, Events)

Properties

PropertyTypeNotes
allowEditbooleanWhether textbox is editable (defaults true)
calendarModeCalendarTypeCalendar type (e.g., Gregorian, Islamic)
cssClassstringRoot CSS class for custom styling
dayHeaderFormatDayHeaderFormatsDay header format (Short/Narrow/Abbreviated/Wide)
depthCalendarViewDeepest allowed calendar view (Month/Year/Decade)
enableMaskbooleanEnable masked date input
enablePersistencebooleanPersist component state between reloads
enableRtlbooleanEnable right-to-left rendering
enabledbooleanEnable or disable the component (set false to disable)
firstDayOfWeeknumberFirst day of week (0-6)
floatLabelTypeFloatLabelTypestring
formatstring\FormatObjectDisplay format for the value
fullScreenModebooleanPopup full-screen mode on mobile
htmlAttributes{[key:string]: string}Additional HTML attributes for root element
inputFormatsstring[]\FormatObject[]Acceptable input formats for parsing
keyConfigs{[key:string]: string}Custom key action mappings
localestringOverride global culture (e.g., 'en-US')
maskPlaceholderMaskPlaceholderModelPlaceholder text for masked input
maxDateMaximum selectable date
minDateMinimum selectable date
openOnFocusbooleanOpen popup on input focus
placeholderstringInput placeholder text
readonlybooleanMake input readonly (no typing)
serverTimezoneOffsetnumberServer timezone offset in minutes (optional)
showClearButtonbooleanShow/hide clear icon
showTodayButtonbooleanShow/hide today button in popup
startCalendarViewInitial view when popup opens
strictModebooleanEnforce strict parsing/validation
valueDateSelected date value
weekNumberbooleanShow week numbers in calendar
weekRuleWeekRuleRule for first week of year
widthnumber\stringComponent width
zIndexnumberZ-index for popup

Methods

  • currentView() — Returns current calendar view name
  • destroy() — Destroy the component instance
  • focusIn() — Focus the input
  • focusOut() — Blur the input
  • getPersistData() — Returns persisted properties string
  • hide() — Hide the calendar popup
  • navigateTo(view: CalendarView, date?: Date) — Navigate to specific view/date
  • removeDate(dates: Date|Date[]) — Remove date(s) from values
  • show() — Show the calendar popup

Events

  • blur — Emits when input loses focus
  • change — Emits when the value changes (provides ChangedEventArgs)
  • cleared — Emits when clear button is used
  • close — Emits when popup closes (preventable)
  • created — Component created lifecycle
  • destroyed — Component destroyed lifecycle
  • focus — Emits when input gets focus
  • navigated — Emits when calendar navigates to another view
  • open — Emits when popup opens (preventable)
  • renderDayCell — Emits for each day cell render (useful to disable/customize cells)

Common Use Cases

  1. Birthday/Birth Date Selection: Min/Max validation, masked input, decade start view for quick year selection
  2. Meeting Scheduler: Date range (today + 90 days), custom working day validation, form integration
  3. Hotel/Flight Booking: Min/Max dates, two-way date binding, reactive forms with validation
  4. Application Forms: Date of birth, license expiry, appointment dates with accessibility compliance
  5. International Applications: Locale-aware formatting, RTL support, culture-specific calendars

Next Steps:

  • Read the relevant reference file for your use case
  • Check accessibility requirements if building for public-facing apps
  • Test with keyboard navigation if accessibility is needed
  • Set up CLDR localization if supporting multiple cultures

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

34.93%
按下载量换算75

Claude

30.31%
按下载量换算65

Cursor

16.87%
按下载量换算36

Gemini CLI

8.53%
按下载量换算18

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills