Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
flatpickr
Advanced tools
A fast, feature-rich, and elegant javascript date picker (vanilla/no dependencies)
Flatpickr is a lightweight and powerful datetime picker library. It allows users to easily select dates, times, or date ranges with a simple and customizable interface. It is highly configurable and supports a wide range of options and plugins to enhance its functionality.
Basic Date Picker
This initializes a basic date picker on an input element with the ID 'datePicker'.
const flatpickr = require('flatpickr');
flatpickr('#datePicker', {});
Date Range Picker
This sets up a date range picker, allowing users to select a start and end date.
const flatpickr = require('flatpickr');
flatpickr('#dateRangePicker', { mode: 'range' });
Time Picker
This initializes a time picker without a calendar, allowing users to select a time.
const flatpickr = require('flatpickr');
flatpickr('#timePicker', { enableTime: true, noCalendar: true, dateFormat: 'H:i' });
Custom Date Format
This sets up a date picker with a custom date format (day-month-year).
const flatpickr = require('flatpickr');
flatpickr('#customFormatPicker', { dateFormat: 'd-m-Y' });
Disabling Specific Dates
This initializes a date picker that disables specific dates, preventing users from selecting them.
const flatpickr = require('flatpickr');
flatpickr('#disableDatesPicker', { disable: ['2023-10-10', '2023-10-20'] });
React DatePicker is a simple and reusable datepicker component for React. It offers similar functionalities to flatpickr but is specifically designed for React applications. It provides a more seamless integration with React's state management and lifecycle methods.
Pikaday is a lightweight JavaScript datepicker with no dependencies. It offers a minimalist approach to date picking and is highly customizable. Compared to flatpickr, Pikaday is more focused on simplicity and ease of use, but it may lack some of the advanced features and plugins available in flatpickr.
Air Datepicker is a lightweight, customizable, and dependency-free datepicker. It provides a wide range of options and configurations similar to flatpickr. However, it may not have as extensive plugin support as flatpickr.
A lightweight (only 2.75kb minified and gzipped), feature-packed datetime picker. Framework-agnostic, and written in vanilla JS.
npm i flatpickr
or bower install flatpickr-calendar
See also:
Demos and documentation : http://chmln.github.io/flatpickr
FAQs
A lightweight, powerful javascript datetime picker
We found that flatpickr demonstrated a not healthy version release cadence and project activity because the last version was released 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
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.