maxDate and minDate not working properly
See original GitHub issueOn Android platform after setting maxDate/minDate, disabled dates are rendered in the lighter color but it is still possible to set them. They are not disabled as expected. Same code works well on iOS platform.
const today = new Date(2016, 2, 15);
<DatePicker
style={styles.datePicker}
date={this.state.date}
mode="date"
placeholder="select date"
format="DD-MM-YYYY"
maxDate={today}
confirmBtnText="Confirm"
cancelBtnText="Cancel"
customStyles={{
dateIcon: {
position: 'absolute',
left: 0,
top: 4,
marginLeft: 0,
},
dateInput: {
marginLeft: 36,
},
}}
onDateChange={(date) => this.setState({date})}
/>
Issue Analytics
- State:
- Created 7 years ago
- Reactions:10
- Comments:14
Top Results From Across the Web
jquery datepicker range (mindate maxdate) is not working
When min and max date are expressions they should be as strings and properly defined. Here is link for jquery ui datepicker MaxDate...
Read more >datePicker and minDate/maxDate/defaultDate/dateFormat not ...
I'm working on a template for WordPress that is utilizing jQuery UI's datePicker to display a calendar on the page. I'm having some...
Read more >MinDate / MaxDate not working properly in UI for ASP.NET AJAX
Problem #1 I can show it properly in the time view picker. However, when I set the MinDate and the MaxDate I am...
Read more >Datepicker Widget - jQuery UI API Documentation
maxDate. minDate. monthNames. monthNamesShort. navigationAsDateFormat ... You can customize the date format and language, restrict the selectable date ...
Read more >Minimum and Maximum Constraints for Date and Time Pickers
The Problem. React-datepicker component provides two properties to constraint the selection of dates: minDate and maxDate.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
for set minDate = today <DatePicker minimumDate={new Date()} onDateChange={(_sd) => this.setState({ _sd })} value={this.state._sd} />
Format of DatePicker should be same as format of minDate and maxDate. It solved issue for me.