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

syncfusion-react-timepickersyncfusion React timepicker 前端

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

1,048

周安装

45

GitHub Stars

1

下载量

367
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/syncfusion/react-ui-components-skills --skill syncfusion-react-timepicker

简介

用于辅助 React 时间选择器组件的开发与维护。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中生成或审查前端组件代码。
  • 通过 GitHub 安装,需结合项目现有设计系统使用。
  • 涉及页面改动时应配合本地预览确认视觉效果。
  • syncfusion-react-timepicker 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Implementing Syncfusion React TimePicker Component

The Syncfusion React TimePicker component provides a user-friendly way to select time values in applications. It supports multiple time formats, time range constraints, keyboard navigation, form integration, and mobile-optimized full-screen mode.

Documentation Navigation Guide

Getting Started

📄 Read: references/getting-started.md

  • Installation via npm (@syncfusion/ej2-react-calendars)
  • CalendarModule setup in app.module.ts
  • CSS imports and theme configuration
  • Basic TimePicker implementation
  • Component registration with useRef
  • Running development server
  • Common troubleshooting

Time Format and Display

📄 Read: references/time-format-and-display.md

  • Format string options (24-hour, 12-hour formats)
  • TimeFormatObject with skeleton property
  • Locale-based time formatting
  • Placeholder text customization
  • Float label types (Never, Always, Auto)
  • htmlAttributes for DOM attributes
  • Masked input with enableMask
  • Mask placeholder configuration

Time Range and Selection

📄 Read: references/time-range-and-selection.md

  • Minimum and maximum time constraints
  • Time step intervals (15, 30, 60 minutes)
  • ScrollTo default position
  • Value binding and two-way updates
  • Read-only and disabled states
  • OpenOnFocus behavior
  • Time popup list population
  • Stepped time intervals

Events and Methods

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

  • Event handlers (change, open, close, blur, focus)
  • Event argument structures
  • Methods (show, hide, focusIn, focusOut)
  • Imperative control with useRef
  • Lifecycle events (created, destroyed)
  • Event patterns and best practices
  • Clearing values and state reset
  • ItemRender for custom formatting

Customization and Styling

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

  • CSS class customization with cssClass
  • Theme options (Material, Bootstrap, Fluent, Tailwind)
  • Full-screen mode for mobile devices
  • RTL (right-to-left) language support
  • Strict mode validation
  • Z-index management
  • Width and height configuration
  • Accessibility features
  • Theme Studio integration

API Reference

📄 Read: references/api-reference.md

  • Complete properties list (26 properties)
  • All methods with signatures (5 methods)
  • All events with event arguments (9 events)
  • Type definitions and interfaces
  • Default values and constraints
  • Use cases for each property

Advanced Patterns

📄 Read: references/advanced-patterns.md

  • Form submission with validation
  • Keyboard shortcuts and keyConfigs
  • Server timezone offset handling
  • Persistence and localStorage
  • Multi-component integration
  • Performance optimization
  • Error handling patterns
  • Complex validation scenarios

Quick Start

import { TimePickerComponent } from '@syncfusion/ej2-react-calendars';
import * as React from 'react';
import '@syncfusion/ej2-base/styles/material3.css';
import '@syncfusion/ej2-calendars/styles/material3.css';

function App() {
  const [selectedTime, setSelectedTime] = React.useState(new Date('1/1/2018 9:00 AM'));

  const handleChange = (e: any) => {
    setSelectedTime(e.value);
  };

  return (
    <div style={{ padding: '20px' }}>
      <h2>Select Time</h2>
      <TimePickerComponent
        value={selectedTime}
        change={handleChange}
        placeholder="Select a time"
      />
      <p>Selected: {selectedTime ? selectedTime.toLocaleTimeString() : 'None'}</p>
    </div>
  );
}

export default App;

Common Patterns

Pattern 1: Time Picker with Min/Max Constraints

import { TimePickerComponent } from '@syncfusion/ej2-react-calendars';
import * as React from 'react';

function AppointmentScheduler() {
  const [appointmentTime, setAppointmentTime] = React.useState(new Date('1/1/2018 9:00 AM'));

  const minTime = new Date('1/1/2018 8:00 AM');
  const maxTime = new Date('1/1/2018 5:00 PM');

  return (
    <div>
      <h3>Select Appointment Time (8 AM - 5 PM)</h3>
      <TimePickerComponent
        value={appointmentTime}
        min={minTime}
        max={maxTime}
        step={30}
        change={(e: any) => setAppointmentTime(e.value)}
        placeholder="Choose time"
      />
    </div>
  );
}

export default AppointmentScheduler;

Pattern 2: Form with Time Picker Submission

import { TimePickerComponent } from '@syncfusion/ej2-react-calendars';
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import * as React from 'react';

function ScheduleForm() {
  const [formData, setFormData] = React.useState({
    startTime: new Date('1/1/2018 9:00 AM'),
    endTime: new Date('1/1/2018 5:00 PM'),
  });

  const handleSubmit = (e: React.FormEvent) => {
    e.preventDefault();
    console.log('Schedule data:', {
      startTime: formData.startTime?.toLocaleTimeString(),
      endTime: formData.endTime?.toLocaleTimeString(),
    });
  };

  return (
    <form onSubmit={handleSubmit}>
      <h3>Schedule Meeting</h3>

      <label>Start Time:</label>
      <TimePickerComponent
        value={formData.startTime}
        change={(e: any) => setFormData(prev => ({ ...prev, startTime: e.value }))}
      />

      <label style={{ marginTop: '10px' }}>End Time:</label>
      <TimePickerComponent
        value={formData.endTime}
        min={formData.startTime}
        change={(e: any) => setFormData(prev => ({ ...prev, endTime: e.value }))}
      />

      <ButtonComponent type="submit" isPrimary={true} style={{ marginTop: '15px' }}>
        Schedule
      </ButtonComponent>
    </form>
  );
}

export default ScheduleForm;

Pattern 3: Time Picker with Custom Format

import { TimePickerComponent } from '@syncfusion/ej2-react-calendars';
import * as React from 'react';

function TimeFormatDemo() {
  const [time12hr, setTime12hr] = React.useState(new Date('1/1/2018 2:30 PM'));
  const [time24hr, setTime24hr] = React.useState(new Date('1/1/2018 14:30'));

  return (
    <div style={{ padding: '20px' }}>
      <div>
        <h4>12-Hour Format (hh:mm a)</h4>
        <TimePickerComponent
          value={time12hr}
          format="hh:mm a"
          change={(e: any) => setTime12hr(e.value)}
        />
        <p>Value: {time12hr?.toLocaleTimeString('en-US', { hour12: true })}</p>
      </div>

      <div style={{ marginTop: '20px' }}>
        <h4>24-Hour Format (HH:mm)</h4>
        <TimePickerComponent
          value={time24hr}
          format="HH:mm"
          change={(e: any) => setTime24hr(e.value)}
        />
        <p>Value: {time24hr?.toLocaleTimeString('en-US', { hour12: false })}</p>
      </div>
    </div>
  );
}

export default TimeFormatDemo;

Pattern 4: Event Handling and State Management

import { TimePickerComponent } from '@syncfusion/ej2-react-calendars';
import * as React from 'react';

function EventTrackingExample() {
  const [selectedTime, setSelectedTime] = React.useState<Date | null>(null);
  const [eventLog, setEventLog] = React.useState<string[]>([]);

  const handleChange = (e: any) => {
    setSelectedTime(e.value);
    setEventLog(prev => [...prev, `Changed: ${e.value?.toLocaleTimeString()}`]);
  };

  const handleOpen = (e: any) => {
    setEventLog(prev => [...prev, 'Popup opened']);
  };

  const handleClose = (e: any) => {
    setEventLog(prev => [...prev, 'Popup closed']);
  };

  return (
    <div style={{ padding: '20px' }}>
      <h3>Time Picker with Event Tracking</h3>
      <TimePickerComponent
        value={selectedTime}
        change={handleChange}
        open={handleOpen}
        close={handleClose}
        placeholder="Select time to track events"
      />

      <div style={{ marginTop: '20px', padding: '10px', border: '1px solid #ccc' }}>
        <h4>Event Log:</h4>
        <ul>
          {eventLog.map((event, idx) => (
            <li key={idx}>{event}</li>
          ))}
        </ul>
      </div>
    </div>
  );
}

export default EventTrackingExample;

Pattern 5: Masked Time Input

import { TimePickerComponent } from '@syncfusion/ej2-react-calendars';
import * as React from 'react';

function MaskedTimePickerExample() {
  const [maskedTime, setMaskedTime] = React.useState(new Date('1/1/2018 10:30 AM'));

  return (
    <div style={{ padding: '20px' }}>
      <h3>Masked Time Input</h3>
      <TimePickerComponent
        value={maskedTime}
        enableMask={true}
        format="hh:mm a"
        maskPlaceholder={{
          hour: 'HH',
          minute: 'MM',
          second: 'SS',
        }}
        change={(e: any) => setMaskedTime(e.value)}
        placeholder="Enter time (HH:MM AM/PM)"
      />
      <p>Masked input helps users enter time in correct format</p>
    </div>
  );
}

export default MaskedTimePickerExample;

Key Props Reference

PropTypeDefaultPurpose
valueDatenullCurrent selected time value
formatstringBased on cultureTime display format (e.g., "HH:mm", "hh:mm a")
minDate00:00Minimum selectable time
maxDate00:00Maximum selectable time
stepnumber30Time interval in minutes between list items
enabledbooleantrueEnable/disable the component
readonlybooleanfalseRead-only state (no editing)
placeholderstring-Input placeholder text
openOnFocusbooleanfalseOpen popup on input focus
enableMaskbooleanfalseEnable masked input mode
enableRtlbooleanfalseEnable right-to-left layout
strictModebooleanfalseValidate input and restrict to valid times
showClearButtonbooleantrueShow/hide clear button
fullScreenModebooleanfalseMobile full-screen mode
cssClassstring-Custom CSS class for styling
floatLabelTypestringNeverFloat label position
allowEditbooleantrueAllow manual input editing
localestring'en-US'Locale for time formatting
scrollToDate-Default scroll position in popup
widthstring/number-Component width
zIndexnumber1000Z-index of popup
serverTimezoneOffsetnumber-Server timezone offset for processing
htmlAttributesobject{}Custom HTML attributes

Related Skills


Next Steps:

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

35.47%
按下载量换算130

Claude

31.18%
按下载量换算114

Cursor

18.68%
按下载量换算69

Gemini CLI

9.43%
按下载量换算35

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills