Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable past dates #254

Open
redimongo opened this issue May 26, 2022 · 1 comment
Open

Disable past dates #254

redimongo opened this issue May 26, 2022 · 1 comment

Comments

@redimongo
Copy link

Is there away to disable dates older than today, as we don't want users to select dates in the past?

<DateRangePicker
                          initialSettings={{ startDate: sdate, endDate: sdate }}
                          onCallback={this.handleCallback} 
                        >
                          <input name="datepicker" type="text" className="form-control" />
                        </DateRangePicker>

Also not sure how we can an option to allow the user to select time (9:00am)

@noah-haub
Copy link

You can disable dates older than today by saying "minDate: new Date()" in initial Settings.
And to enable time picking say "timePicker: true" in initial Settings.

I suggest you read through the documentation and examples on this page: http://www.daterangepicker.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants