Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

188
Views
How to disable today's date and datepicker default is the next day

I am trying to create a function that return open date picker will return the next day of today's date, example: today's date is Oct 1, 2021 so the next day will be Oct 2, 2021.

Here is my code base:

  openToDate(val:any){

    console.log("val: ", val)
    return moment(val).toDate();
  }

        <DatePicker
          customInput={
            <React.Fragment>
              <input
                tabIndex={this.props.tabIndex}
                className="exact-date-input"
                placeholder={this.props.placeholder}
                autoComplete="off"
                type="text"
                maxLength={10}
                id="date-input"
                aria-label={ariaLabel}
                value={this.state.inputValue}
                onKeyDown={this.onKeyDownDateType}
                onClick={()=>this.openOrCloseDatePicker(true, this.state.error)}
                onFocus={()=>this.openOrCloseDatePicker(true, this.state.error)}
                onBlur={()=>this.emptyIfError(this.state.error)}
              />
            </React.Fragment>
          }
          openToDate={this.openToDate(this.props.value)}
          tabIndex={-1}
          selected={this.openToDate(this.props.value)}
          customInputRef="dateInput"
          autoComplete="off"
          id={this.props.id}
          onChange={this.handleInput}
          required={this.props.required}
          minDate={moment(today).toDate()}
          maxDate={moment(endRange).toDate()}
          open={this.state.datePickerIsOpen}
          onClickOutside={()=>this.openOrCloseDatePicker(false, this.state.error)}
        />

How can I make today's date disable and auto selected will be the next day ? enter image description here

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!