value
Description
sets a value of the Month controlType
object | Date object
Example
<Month
current={new Date(2022, 4, 1)}
value={{ start: new Date(2022, 4, 4), end: new Date(2022, 4, 6) }} >
</Month>
Details
The value property can be used:
- as an object with start and end dates for date range selection in a month or in several months
In this case the value object contains two properties presented as key:value pairs, where:
- key - the name of the date object (start or end)
- value - the value set via the new Date() constructor
<Month
value={{ start: new Date(2022, 4, 4), end: new Date(2022, 4, 6) }}>
</Month>
Related article: Selecting a date range
- as a Date object for selecting a single day in a month
In this case it is used together with the part property, as follows:
<Month
part={"normal"}
value={new Date(2022, 4, 1)}/>
Related article: Selecting a single date