🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@weektime-picker/react

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@weektime-picker/react

Week time grid component for React

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

WeekTime Picker

A flexible week time grid component for React applications.

Features

  • 📅 Week-based time selection grid
  • ⚡ Support for React 18+
  • 🎨 Customizable themes and styling
  • 📱 Responsive design
  • 🔧 TypeScript support
  • 🎯 Flexible time intervals (15min, 30min, 1hour)

Packages

  • @weektime-picker/react - React component

Installation & Usage

React

npm install @weektime-picker/react
or
pnpm add @weektime-picker/react

react示例

import React, { useState } from "react";
import { WeekTimeGrid } from "@weektime-picker/react";

function App() {
  const [selectedRanges, setSelectedRanges] = useState([]);

  return (
    <WeekTimeGrid
      selectedRanges={selectedRanges}
      onSelectedRangesChange={setSelectedRanges}
      startHour={9}
      endHour={18}
      timeInterval={60}
    />
  );
}

API

Props

PropTypeDefaultDescription
selectedRangesTimeRange[][]Array of selected time ranges
onSelectedRangesChange (React) / @selectedRangesChange (Vue)Function-Callback when selection changes
startHournumber0Start hour (0-23)
endHournumber24End hour (1-24)
timeIntervalnumber60Time interval in minutes (15, 30, 60)
themeColorstring'#4a89dc'Theme color for selected cells
dayLabelsstring[]['周一', '周二', ...]Custom day labels

Types

interface TimeRange {
  day: number; // 0-6 (Monday to Sunday)
  startTime: number; // Start time in minutes from 00:00
  endTime: number; // End time in minutes from 00:00
}

License

MIT

Keywords

time-picker

FAQs

Package last updated on 25 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts