
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@nayojs/react-datetime-picker
Advanced tools
A simple and flexible React component for date and time selection.
React DateTime Picker is a robust and highly customizable date-time picker library for React applications. This component offers seamless integration with various UI designs, allowing developers to choose from a wide range of styling options or apply custom styles to match their projects' specific requirements.
To install the library, use npm:
npm install @nayojs/react-datetime-picker
The DatePicker component combines the functionality of a calendar and time picker into a single component. It can be customized with styles and classes that are passed down to the Calendar and TimePicker components.
The Calendar component provides a visual representation of a calendar where users can select a date. It is fully customizable, allowing developers to define the appearance of various parts of the calendar.
The TimePicker component allows users to select a specific time. Like the Calendar, it is highly customizable, with various style options for different elements.
Here’s a basic example of how to use the DatePicker component:
import React from 'react';
import { DatePicker } from '@nayojs/react-datetime-picker';
function App() {
const selectDateHandler = (date) => {
console.log('Selected Date:', date);
};
const selectTimeHandler = (time) => {
console.log('Selected Time:', time);
};
return (
<div>
<Calendar selectDateHandler={selectDateHandler} selectTimeHandler={selectTimeHandler}/>
</div>
);
}
export default App;
To use the Calendar component independently:
import React from 'react';
import { Calendar } from '@nayojs/react-datetime-picker';
function App() {
const selectDateHandler = (date) => {
console.log('Selected Date:', date);
};
return (
<div>
<Calendar selectDateHandler={selectDateHandler} />
</div>
);
}
export default App;
To use the TimePicker component independently:
import React from 'react';
import { TimePicker } from '@nayojs/react-datetime-picker';
function App() {
const selectTimeHandler = (time) => {
console.log('Selected Time:', time);
};
return (
<div>
<TimePicker selectTimeHandler={selectTimeHandler} />
</div>
);
}
export default App;
The DatePicker, Calendar, and TimePicker components come with default styles, but you can easily override them by passing custom class names or styles.
import React from 'react';
import { DatePicker } from '@nayojs/react-datetime-picker';
function App() {
const selectDateHandler = (date) => {
console.log('Selected Date:', date);
};
return (
<div>
<DatePicker
selectDateHandler={selectDateHandler}
datePickerStyles={{
containerStyles: { width: '300px' },
triggerStyles: { padding: '10px', backgroundColor: '#f0f0f0' },
}}
calendarStyles={{
containerStyles: { backgroundColor: '#fff' },
dateStyles: { color: '#333' },
selectedDateStyles: { backgroundColor: '#1A71FF', color: 'white' },
}}
/>
</div>
);
}
export default App;
For each component, you can override specific style classes and styles:
DatePicker
containerClass: Styles the main container of the date picker.triggerClass: Styles the trigger button/input.calendarClasses: Classes passed down to the Calendar component.calendarStyles: Styles passed down to the Calendar component.Calendar
containerClass: Styles the main container of the calendar.headerClass: Styles the header of the calendar.dateClass: Styles individual date cells.selectedDateClass: Styles the selected date.navigatorClass: Styles the navigation buttons.TimePicker
containerClass: Styles the main container of the time picker.triggerClass: Styles the trigger button/input.timeContainerClass: Styles the time selection container.timeItemClass: Styles each time option.selectedTimeItemClass: Styles the selected time option.The library provides default styles for all components. If you do not override these styles, the components will use the following defaults:
To ensure that overriding a specific style doesn’t remove other default styles, use the mergeStyles utility function:
import React from 'react';
import { DatePicker, mergeStyles } from '@nayojs/react-datetime-picker';
const customStyles = mergeStyles({
nayojsDatetimePickerContainer: 'background-color: blue;',
});
function App() {
const selectDateHandler = (date) => {
console.log('Selected Date:', date);
};
return (
<div>
<DatePicker
selectDateHandler={selectDateHandler}
datePickerStyles={customStyles}
/>
</div>
);
}
export default App;
If you'd like to contribute to the project, please follow these guidelines:
If you find EduMeet helpful, please give us a star ⭐️ on GitHub! Your support is greatly appreciated and motivates us to keep improving the project.
:bust_in_silhouette: RWUBAKWANAYO
React DateTime Picker is licensed under the MIT License. For more information, see the LICENSE file.
FAQs
A simple and flexible React component for date and time selection.
We found that @nayojs/react-datetime-picker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.