
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@di0fref/tailwind-datepicker-react
Advanced tools
A tailwindcss/flowbite datepicker component built as a react component with types
A Tailwindcss/Flowbite datepicker component built as a React component with types
Date logic from VanillaJS-datepicker
npm install tailwind-datepicker-react
yarn add tailwind-datepicker-react
tailwind.config.js
filemodule.exports = {
...
content: [
...
"./node_modules/tailwind-datepicker-react/dist/**/*.js", // <--- Add this line
],
};
import Datepicker from "tailwind-datepicker-react"
const options = {
title: "Demo Title",
autoHide: true,
todayBtn: false,
clearBtn: true,
maxDate: new Date("2030-01-01"),
minDate: new Date("1950-01-01"),
theme: {
background: "bg-gray-700 dark:bg-gray-800",
todayBtn: "",
clearBtn: "",
icons: "",
text: "",
disabledText: "bg-red-500",
input: "",
inputIcon: "",
selected: "",
},
icons: {
// () => ReactElement | JSX.Element
prev: () => <span>Previous</span>,
next: () => <span>Next</span>,
},
datepickerClassNames: "top-12",
defaultDate: new Date("2022-01-01"),
language: "en",
}
const DemoComponent = () => {
const [show, setShow] = useState <boolean>(false)
const handleChange = (selectedDate: Date) => {
console.log(selectedDate)
}
const handleClose = (state: boolean) => {
setShow(state)
}
return (
<div>
<Datepicker options={options} onChange={handleChange} show={show} setShow={handleClose} />
</div>
)
}
const options = {
title: "Demo Title",
autoHide: true,
todayBtn: false,
clearBtn: true,
maxDate: new Date("2030-01-01"),
minDate: new Date("1950-01-01"),
theme: {
background: "bg-gray-700 dark:bg-gray-800",
todayBtn: "",
clearBtn: "",
icons: "",
text: "",
disabledText: "bg-red-500",
input: "",
inputIcon: "",
selected: "",
},
icons: { // () => ReactElement | JSX.Element
prev: () => <span>Previous</span>,
next: () => <span>Next</span>,
},
datepickerClassNames: "top-12",
defaultDate: new Date("2022-01-01"),
language: "en",
}
const DemoComponent = () => {
const [show, setShow] = useState<boolean>(false)
const [selectedDate, setSelectedDate] = useState<Date | null>(null)
const handleChange = (selectedDate: Date) => {
setSelectedDate(selectedDate)
console.log(selectedDate)
}
const handleClose = (state: boolean) => {
setShow(state)
}
return (
<div>
<Datepicker options={options} onChange={handleChange} show={show} setShow={handleClose} />
<div className="...">
<div className="...">
<CalendarIcon />
</div>
<input
type="text"
className="..."
placeholder="Select Date"
value={selectedDate}
onFocus={() => setShow(true)}
readOnly
/>
</div>
</DatePicker>
</div>
)
}
disabled
true
true
true
disabled
disabled
As seen on demo page
As seen on demo page
""
new Date()
en
FAQs
A tailwindcss/flowbite datepicker component built as a react component with types
We found that @di0fref/tailwind-datepicker-react 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.