
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
datepicker-cmp
Advanced tools
Datepicker-Cmp is a versatile and customizable React component for selecting dates. It provides a date input field along with a date picker modal that allows users to pick a date from a calendar. This component offers various customization options for styling and behavior.
To use the SelectMenu component in your React application, you need:
To have node Node : ^16.15.1
To have install tailwindcss : https://tailwindcss.com/docs/installation/framework-guides
datepicker-cmp package via npm:npm install datepicker-cmp
Your tailwin.config.js should be like this :
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
'./node_modules/datepicker-cmp/**/*.{js,ts,jsx,tsx}',
],
theme: {
extend: {},
},
plugins: [],
}
The DatePicker component is used to display a date input field and a date picker modal. It accepts the following props:
id (string): A unique identifier for the component.selectedDate (string): The selected date in the format 'YYYY-MM-DD'.minYear (number, optional): The minimum selectable year in the date picker.substractionYears (number, optional): The number of years to subtract from the current year for the maxYear calculation.zIndex (string): The z-index CSS property for the component.isError (boolean): Indicates whether there is an error with the date (true) or not (false).setter (function): A function to update the selected date.backgroundColor (string, optional): The background color of the date input field.backgroundColorDropdown (string, optional): The background color of the date picker modal.textColor (string, optional): The text color of both the input field and the modal.borderColor (string, optional): The border color of the input field.width (string, optional): The width of the date input field.height (string, optional): The height of the date input field.Example usage:
import { DatePicker } from 'datepicker-cmp';
const App = () => {
const id = 'datepicker';
const selectedDate = '2023-10-06';
const minYear = 1900;
const substractionYears = 100;
const zIndex = '100';
const isError = false;
const handleDateChange = (newDate) => {
// Handle date change logic here
};
return (
<DatePicker
id={id}
selectedDate={selectedDate}
minYear={minYear}
substractionYears={substractionYears}
zIndex={zIndex}
isError={isError}
setter={handleDateChange}
backgroundColor="transparent"
backgroundColorDropdown="white"
textColor="#000"
borderColor="#ccc"
width="370px"
height="45px"
/>
);
};
Please refer to the PropTypes documentation for the DatePicker component above for information on the expected prop types and their default values.
The datepicker-cmp package requires Node.js version ^16.15.1 to work correctly.
This package is distributed under the MIT License. Feel free to use and customize it to suit your needs.
If you encounter any issues or have suggestions for improvements, please open an issue on GitHub. We appreciate your feedback!
FAQs
datepicker package
We found that datepicker-cmp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.