Skip to main content

value

Description

sets a value of the Month control

Type

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:

  1. 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:

<Month 
value={{ start: new Date(2022, 4, 4), end: new Date(2022, 4, 6) }}>
</Month>

Related article: Selecting a date range

  1. 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