How to set default value in Calendar

UI Components for React
Post Reply
mpprime
Posts: 1
Joined: 10 Apr 2016, 17:47

17 Jun 2020, 15:54

Hi.
I'm trying to put the default day into a Calendar component.
at the moment I set it fixed in the state:

Code: Select all

    this.state = {
            start: '18/06/2020'
        };
        
        
        <Calendar id="data_inizio" showIcon={true} value={this.state.start} required
                                          onChange={(e) => this.setState({start: e.value, minDate: e.value})}
                                          dateFormat="dd/mm/yy" monthNavigator={true} yearNavigator={true}
                                          yearRange="2020:2030" touchUI={true}/>
but the Calendar is always empty.

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest