
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
@contentful/f36-datepicker
Advanced tools
Datepicker component enables users to enter a date either through text input or selecting a date from the Calendar dropdown.
The Datepicker component combines text input, and calendar in dropdown.
Use Datepicker to ask user's for date input in forms, modals, or filtering.
import { Datepicker } from '@contentful/f36-components';
// or
import { Datepicker } from '@contentful/f36-datepicker';
Display Datepicker component with text input
Datepicker supports printing out different formats to users, see https://date-fns.org/v2.16.1/docs/format
At Contentful we use dd LLL yyyy format to communicate date to users, example 31 Jan 2021
Visual states indicates to users certain messages through UI.
Communicate to the users in text why the Datepicker is in a specific state, example:
Disabled: "You don't have access to edit this field!" Invalid: "Please enter a valid date!"
You can use Datepicker with the FormControl in order to enhance layout with input label, help text or validation message.
Set mininum and/or maximum dates to limit users to choose from a specific period in time.
Use the fromDate and toDate properties to control time frames.
If you need to show more than a month at once, use the numberOfMonths property.
To replace default placeholder with your custom one, use the placeholder property.
Use the defaultIsOpen property to open the dropdown and display the Calendar by default without user interaction.
Note: the Calendar closes by pressing the escape key or by clicking outside of the Datepicker.
If you need a custom solution, you can build it by leveraging our lower-level components, such as Calendar, Popover, and TextInput. For example, Datepicker that uses text input as a trigger without a button.
FAQs
Forma 36: Datepicker component
The npm package @contentful/f36-datepicker receives a total of 35,687 weekly downloads. As such, @contentful/f36-datepicker popularity was classified as popular.
We found that @contentful/f36-datepicker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.