value
Description
Optional. Sets a value of the Month controlUsage
value?: { start: Date; end: Date } | Date;
Parameters
The value property supports two formats:
-
Date range – an object with two properties:
start
– the starting date of the rangeend
`– the ending date of the range. Used for selecting a continuous range of dates within a month or across several months.
<Month value={{ start: new Date(2022, 4, 4), end: new Date(2022, 4, 6) }} />
- Single date – a single Date object.
Used for selecting one day in a month. Usually combined with the
part
property.
<Month
part={"normal"}
value={new Date(2022, 4, 1)}/>
Example
<Month
current={new Date(2022, 4, 1)}
value={{ start: new Date(2022, 4, 4), end: new Date(2022, 4, 6) }} >
</Month>
Related articles: