Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

DatePickerRange: Add default value for minimum_nights in doc #437

Open
@EBoisseauSierra

Description

@EBoisseauSierra

I have noticed that dcc.DatePickerRange has a default value for minimum_nights set to 1.
(I.e., in a bare component, you must select a end_date strictly later than start_date; yet if you set minimum_nights=0, then you can select the same day for start_date and end_date.)

However, in the documentation, the default value for minimum_nights is not defined (… what led me foolishly look for alternatives involving two DatePickerSingle, but that's another story).

Could we make explicit in the documentation what default value is used for minimum_nights?


# import external modules
import dash
import dash_core_components as dcc

# import external functions
from datetime import datetime

app = dash.Dash(
    __name__,
)

app.layout = dcc.DatePickerRange(
    # minimum_nights=0,
    initial_visible_month=datetime(
        datetime.now().year,
        datetime.now().month,
        1
    ),
)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    dash-type-bugSomething isn't working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions