
Security News
Critical Security Vulnerability in React Server Components
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.
@metadiv-studio/date-time-picker
Advanced tools
A modern, accessible date and time picker component built with React, TypeScript, and Tailwind CSS. This component provides an intuitive interface for selecting both date and time with a clean, shadcn UI-inspired design.
A modern, accessible date and time picker component built with React, TypeScript, and Tailwind CSS. This component provides an intuitive interface for selecting both date and time with a clean, shadcn UI-inspired design.
npm install @metadiv-studio/date-time-picker
This component requires the following peer dependencies:
{
"react": "^18",
"react-dom": "^18"
}
Important: You must add the package files to your tailwind.config.ts content array to ensure proper styling:
// tailwind.config.ts
export default {
content: [
// ... your existing content
"./node_modules/@metadiv-studio/**/*.{js,ts,jsx,tsx}"
],
// ... rest of your config
}
import React, { useState } from 'react'
import { DateTimePicker } from '@metadiv-studio/date-time-picker'
function App() {
const [date, setDate] = useState<Date>()
return (
<DateTimePicker
date={date}
setDate={setDate}
className="w-full max-w-sm"
/>
)
}
date (optional)Type: Date | undefined
Description: The currently selected date and time. When undefined, the picker shows a placeholder text.
Example:
const [selectedDateTime, setSelectedDateTime] = useState<Date>(new Date())
<DateTimePicker
date={selectedDateTime}
setDate={setSelectedDateTime}
/>
setDateType: (date: Date | undefined) => void
Description: Callback function that is called when a new date and time is selected. The function receives the selected Date object or undefined if no date is selected.
Example:
const handleDateTimeChange = (newDate: Date | undefined) => {
if (newDate) {
console.log('Selected date:', newDate.toISOString())
// Update your application state
setSelectedDateTime(newDate)
}
}
<DateTimePicker
date={selectedDateTime}
setDate={handleDateTimeChange}
/>
className (optional)Type: string
Description: Additional CSS classes for custom styling. The component uses Tailwind CSS classes and can be extended with your own styles.
Example:
<DateTimePicker
date={date}
setDate={setDate}
className="w-full max-w-md border-2 border-blue-200 rounded-lg"
/>
The component includes built-in translation keys for:
The component uses a combination of:
// Custom width and border
<DateTimePicker
className="w-80 border-2 border-gray-300 rounded-xl"
/>
// Custom button styling
<DateTimePicker
className="[&>button]:bg-blue-500 [&>button]:text-white [&>button]:hover:bg-blue-600"
/>
// Dark mode specific styles
<DateTimePicker
className="dark:bg-gray-800 dark:text-white"
/>
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Clean build artifacts
npm run clean
The DateTimePicker is composed of several sub-components:
UNLICENSED
FAQs
A modern, accessible date and time picker component built with React, TypeScript, and Tailwind CSS. This component provides an intuitive interface for selecting both date and time with a clean, shadcn UI-inspired design.
We found that @metadiv-studio/date-time-picker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

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.

Security News
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.

Research
/Security News
We spotted a wave of auto-generated “elf-*” npm packages published every two minutes from new accounts, with simple malware variants and early takedowns underway.

Security News
TypeScript 6.0 will be the last JavaScript-based major release, as the project shifts to the TypeScript 7 native toolchain with major build speedups.