![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@commercetools-uikit/date-input
Advanced tools
import { DateInput } from '@commercetools-frontend/ui-kit';
The DateInput
component allows the user to select a date. It formats the selected date depending on the users' locale.
<DateInput
placeholder="Select a date..."
value="2017-12-31"
onChange={() => {}}
/>
Props | Type | Required | Values | Default | Description |
---|---|---|---|---|---|
horizontalConstraint | object | - | m , l , xl , scale | scale | Horizontal size limit of the input field. |
value | string | ✅ | - | - | The selected date, must either be an empty string or a date formatted as "YYYY-MM-DD". |
onChange | func | ✅ | - | - | Called when the date changes. Called with an event containing either an empty string (no value) or a string in this format: "YYYY-MM-DD". |
onFocus | func | - | - | - | Called when the date input gains focus. |
onBlur | func | - | - | - | Called when the date input loses focus. |
id | string | - | - | - | Used as the HTML id attribute. |
name | string | - | - | - | Used as the HTML name attribute. |
placeholder | string | - | - | - | Placeholder value to show in the input field |
isDisabled | bool | - | - | false | Disables the date picker |
isReadOnly | bool | - | - | false | Disables the date picker menu and makes input field read-only |
hasError | bool | - | - | - | Indicates the input field has an error |
hasWarning | bool | - | - | - | Indicates the input field has a warning |
minValue | string | - | - | - | A minimum selectable date. Must either be an empty string or a date formatted as "YYYY-MM-DD". |
maxValue | string | - | - | - | A maximum selectable date. Must either be an empty string or a date formatted as "YYYY-MM-DD". |
DateInput.isEmpty
Returns true
when the value is considered empty, which is when the value is an empty string.
DateInput.isEmpty(''); // -> true
DateInput.isEmpty('2018-09-20'); // -> false
FAQs
The `DateInput` component allows the user to select a date. It formats the selected date depending on the users' locale.
The npm package @commercetools-uikit/date-input receives a total of 1,837 weekly downloads. As such, @commercetools-uikit/date-input popularity was classified as popular.
We found that @commercetools-uikit/date-input demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.