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

DatePickerRange ignoring stay_open_on_select option #2979

Open
brett-matson opened this issue Sep 4, 2024 · 0 comments
Open

DatePickerRange ignoring stay_open_on_select option #2979

brett-matson opened this issue Sep 4, 2024 · 0 comments
Assignees
Labels
bug something broken P2 needed for current cycle

Comments

@brett-matson
Copy link

brett-matson commented Sep 4, 2024

Describe your context
Please provide us your environment, so we can easily reproduce the issue.

  • replace the result of pip list | grep dash below
dash                        2.17.1
dash-bootstrap-components   1.6.0
dash-extensions             1.0.18
dash-table                  5.0.0
  • if frontend related, tell us your Browser, Version and OS

    • OS: Mac OS 14.5
    • Browser Chrome
    • Version 128.0.6613.85

Describe the bug

The DatePickerRange has an option 'stay_open_on_select' option:

stay_open_on_select (boolean; default False): If True the calendar will not close when the user has selected a value and will wait until the user clicks off the calendar.

However, the DatePickerRange always stays open until two dates are selected regardless of whether this setting is True or False. A minimal code example that demonstrates this is:

from dash import Dash, html, dcc, Input, Output, callback
from datetime import date

app = Dash(__name__)
app.layout = html.Div([
    dcc.DatePickerRange(
                    id='date-range-picker',
                    stay_open_on_select=False
                ),
    html.Div(id='date-range-picker')
])

@callback(
    Output('output-container-date-picker-single', 'children'),
    Input('my-date-picker-single', 'date'))
def update_output(date_value):
    pass

if __name__ == '__main__':
    app.run(debug=True)

Expected behavior

The DatePickerRange always stays open until two dates are selected regardless of whether this setting is True or False.

Screenshots

If applicable, add screenshots or screen recording to help explain your problem.

@gvwilson gvwilson changed the title [BUG] DatePickerRange ignoring stay_open_on_select option DatePickerRange ignoring stay_open_on_select option Sep 4, 2024
@gvwilson gvwilson added bug something broken P2 needed for current cycle labels Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P2 needed for current cycle
Projects
None yet
Development

No branches or pull requests

3 participants