Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-lee committed Nov 13, 2024
1 parent 854718e commit 162227e
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,19 +286,21 @@ type Options = {
digits?: 'numeric' | '2-digit'
snapToStep?: boolean
wheelControl?: boolean
disallowPartial?: boolean
}
```
| Option | Default | Description |
| -------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `date` | `undefined` | The initial date. If not set, it will render the placeholders in their respective input fields (if set). |
| `minDate` | `undefined` | The minimum date that the user can select. `$NOW` is a special value that represents the current date and time. [See more below](#now-vavue) |
| `maxDate` | `undefined` | The maximum date that the user can select. `$NOW` is a special value that represents the current date and time. [See more below](#now-value) |
| `hour12` | `false` | If set to `true`, the time input will use a 12-hour format (with AM/PM). If set to `false`, it will use a 24-hour format. |
| `digits` | `'2-digit'` | Controls the display of the day and month in the date input. `'numeric'` displays as 1-12 for month and 1-31 for day, while `'2-digit'` displays as 01-12 for month and 01-31 for day. This follows [`Intl.DateTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#day) convention. |
| `wrapAround` | `false` | If set to `true`, the time input will wrap around from the end of one period (AM/PM or day) to the beginning of the next. |
| `snapToStep` | `false` | If set to `true`, the input value will snap to the nearest step when the user uses arrow keys to increment/decrement values. Can be further adjust by using the [`step` attribute](#step-on-input-elements) |
| `wheelControl` | `false` | If set to `true`, the user can use the mouse wheel or touchpad to increment/decrement values. |
| Option | Default | Description |
| ----------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `date` | `undefined` | The initial date. If not set, it will render the placeholders in their respective input fields (if set). |
| `minDate` | `undefined` | The minimum date that the user can select. `$NOW` is a special value that represents the current date and time. [See more below](#now-vavue) |
| `maxDate` | `undefined` | The maximum date that the user can select. `$NOW` is a special value that represents the current date and time. [See more below](#now-value) |
| `hour12` | `false` | If set to `true`, the time input will use a 12-hour format (with AM/PM). If set to `false`, it will use a 24-hour format. |
| `digits` | `'2-digit'` | Controls the display of the day and month in the date input. `'numeric'` displays as 1-12 for month and 1-31 for day, while `'2-digit'` displays as 01-12 for month and 01-31 for day. This follows [`Intl.DateTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#day) convention. |
| `wrapAround` | `false` | If set to `true`, the time input will wrap around from the end of one period (AM/PM or day) to the beginning of the next. |
| `snapToStep` | `false` | If set to `true`, the input value will snap to the nearest step when the user uses arrow keys to increment/decrement values. Can be further adjust by using the [`step` attribute](#step-on-input-elements) |
| `wheelControl` | `false` | If set to `true`, the user can use the mouse wheel or touchpad to increment/decrement values. |
| `disallowPartial` | `false` | If `true`, the input requires fully completed dates and times. By default partial dates are allowed, similar to native HTML input behavior. |
### `$NOW` value
Expand Down

0 comments on commit 162227e

Please sign in to comment.