You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if frontend related, tell us your Browser, Version and OS
OS: Oracle Linux 9 with Python 3.12
Browser Chrome
Version 126
Describe the bug
When using DatePickerRange with min_date_allowed and max_date_allowed, choosing a date for start date, there will be one more day after the max date displayed as available but not really selectable.
Expected behavior
Nothing should be available outside of the min_date_allowed and max_date_allowed range?
Screenshots
If applicable, add screenshots or screen recording to help explain your problem.
Here's the minimum code to reproduce it.
fromdatetimeimportdatefromdashimportDash, dcc, html, Input, Output, callbackapp=Dash(__name__)
app.layout=html.Div([
dcc.DatePickerRange(
id='my-date-picker-range',
min_date_allowed=date(2024, 6, 1),
max_date_allowed=date(2024, 6, 15),
initial_visible_month=date(2024, 6, 1),
end_date=date(2024, 6, 15),
minimum_nights=0
),
html.Div(id='output-container-date-picker-range')
])
@callback(Output('output-container-date-picker-range', 'children'),Input('my-date-picker-range', 'start_date'),Input('my-date-picker-range', 'end_date'))defupdate_output(start_date, end_date):
string_prefix='You have selected: 'ifstart_dateisnotNone:
start_date_object=date.fromisoformat(start_date)
start_date_string=start_date_object.strftime('%B %d, %Y')
string_prefix=string_prefix+'Start Date: '+start_date_string+' | 'ifend_dateisnotNone:
end_date_object=date.fromisoformat(end_date)
end_date_string=end_date_object.strftime('%B %d, %Y')
string_prefix=string_prefix+'End Date: '+end_date_stringiflen(string_prefix) ==len('You have selected: '):
return'Select a date to see it displayed here'else:
returnstring_prefixif__name__=='__main__':
app.run(debug=True)
The text was updated successfully, but these errors were encountered:
Thank you so much for helping improve the quality of Dash!
We do our best to catch bugs during the release process, but we rely on your help to find the ones that slip through.
Describe your context
Please provide us your environment, so we can easily reproduce the issue.
pip list | grep dash
belowif frontend related, tell us your Browser, Version and OS
Describe the bug
When using
DatePickerRange
withmin_date_allowed
andmax_date_allowed
, choosing a date for start date, there will be one more day after the max date displayed as available but not really selectable.Expected behavior
Nothing should be available outside of the
min_date_allowed
andmax_date_allowed
range?Screenshots
If applicable, add screenshots or screen recording to help explain your problem.
![image](https://cdn.statically.io/img/private-user-images.githubusercontent.com/23041178/345214390-bd4f695d-0ca1-4d6c-8a42-304534023ecf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI1NjY0MzgsIm5iZiI6MTcyMjU2NjEzOCwicGF0aCI6Ii8yMzA0MTE3OC8zNDUyMTQzOTAtYmQ0ZjY5NWQtMGNhMS00ZDZjLThhNDItMzA0NTM0MDIzZWNmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODAyVDAyMzUzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRlYzMzNjYyYjdjY2JlMTI4Y2FkODdkYzBiNzhmNmMyMjU3Yzg1ZGFhYmFhNDM2OWM3NmZjODQ1NGYyNGZkNmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.wl2G8-BM8Hr8J3GQaMm9ljkDSTRB_2zufvIrR04Dchc)
![image](https://cdn.statically.io/img/private-user-images.githubusercontent.com/23041178/345214510-cd874af1-cb16-410c-bb53-e03f1be9d609.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI1NjY0MzgsIm5iZiI6MTcyMjU2NjEzOCwicGF0aCI6Ii8yMzA0MTE3OC8zNDUyMTQ1MTAtY2Q4NzRhZjEtY2IxNi00MTBjLWJiNTMtZTAzZjFiZTlkNjA5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODAyVDAyMzUzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg2ODNlOTkzYmIzNzJmMzM4NzRkY2FlM2I4YzZjNWNkNDY1YjZkMmNhYTYzYmJhY2RlNmUzOTVlZmY0NzA1MjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.YE9fGQC89lIM8Q0AeeYusUFa2uxZ7t4jv0OssBMAQes)
Here's the minimum code to reproduce it.
The text was updated successfully, but these errors were encountered: