Skip to content

Update date_input to accept a range for a ranged datepicker#1483

Merged
karriebear merged 7 commits intostreamlit:developfrom
karriebear:feature/1020-date-range
May 21, 2020
Merged

Update date_input to accept a range for a ranged datepicker#1483
karriebear merged 7 commits intostreamlit:developfrom
karriebear:feature/1020-date-range

Conversation

@karriebear
Copy link
Copy Markdown
Contributor

@karriebear karriebear commented May 20, 2020

Issue: #1020

Description:

  1. Updated date_input so that value can be a single date/datetime or a list of 0-2 date/datetime.
  • DateInput updated to accept an array of dates.
  • If a single value is passed, it is converted into a list.
  • If a list is provided, the range attribute will be set to True.
  1. Update slider so that value can be an empty list. If an empty list is provided, set the default to max/min values.

Contribution License Agreement

By submiting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@karriebear karriebear marked this pull request as ready for review May 20, 2020 22:02
@karriebear karriebear requested a review from a team as a code owner May 20, 2020 22:02
@karriebear karriebear requested a review from tvst May 20, 2020 22:36
Copy link
Copy Markdown
Contributor

@tvst tvst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

Added some comments about nit-picky code cleanups, plus 1 comment about an error message that this code no longer throws but should.

Please address comments, then feel free to merge without further review!

@karriebear karriebear changed the title Feature/1020 date range Update date_input to accept a range for a ranged datepicker May 21, 2020
@karriebear karriebear force-pushed the feature/1020-date-range branch from 2d918b7 to 86f2d6c Compare May 21, 2020 18:00
@karriebear karriebear force-pushed the feature/1020-date-range branch from 86f2d6c to cad3ce1 Compare May 21, 2020 18:45
@karriebear karriebear merged commit fd67fb9 into streamlit:develop May 21, 2020
tconkling added a commit that referenced this pull request May 26, 2020
* develop:
  If it is a windows machine, check if terminal is latest version that supports emojis (#1490)
  Remove Python 2 check in 'hello' df demo (#1486)
  Update README (#1493)
  Fix broken link by removing unnecessary 'd' (#1492)
  Update doc references for RTD (#1485)
  Remove excess parenthesis from selectbox example (#1488)
  Upgrade patch versions (#1463)
  Update date_input to accept a range for a ranged datepicker (#1483)
  radio docstring consistency in format_func param (#1480)
  Hash func for Tensorflow saved model (#1468)
  Figure out which env we are in for RTD (#1473)
  Version 0.60.0 (#1460)
  Remove extra start_time parameter (#1470)
  Fix spelling mistake in hello demo (#1469)
tconkling added a commit to tconkling/streamlit that referenced this pull request May 26, 2020
* feature/plugins: (26 commits)
  revert accidentally-committed datframe serialization breakage
  Example PyPI package (streamlit#1462)
  If it is a windows machine, check if terminal is latest version that supports emojis (streamlit#1490)
  Remove Python 2 check in 'hello' df demo (streamlit#1486)
  Update README (streamlit#1493)
  Fix broken link by removing unnecessary 'd' (streamlit#1492)
  Update doc references for RTD (streamlit#1485)
  Remove excess parenthesis from selectbox example (streamlit#1488)
  Upgrade patch versions (streamlit#1463)
  Update date_input to accept a range for a ranged datepicker (streamlit#1483)
  radio docstring consistency in format_func param (streamlit#1480)
  Hash func for Tensorflow saved model (streamlit#1468)
  Figure out which env we are in for RTD (streamlit#1473)
  Fix component examples
  Version 0.60.0 (streamlit#1460)
  Remove extra start_time parameter (streamlit#1470)
  Fix spelling mistake in hello demo (streamlit#1469)
  Keras model hash func (streamlit#1450)
  Add support for st.echo("below") to print echoed text below the Streamlit output (streamlit#1452)
  Update 3.5 references to 3.6 (streamlit#1444)
  ...
@karriebear karriebear deleted the feature/1020-date-range branch July 20, 2020 15:50
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

Successfully merging this pull request may close these issues.

2 participants