Skip to content

date_input cannot go before January, 2000  #741

@egzonsyka

Description

@egzonsyka

Summary

st.date_input widget is unable to go before January 2000, e.g. 1999,1990, etc… It doesn’t matter if you use the dropdown box or the left arrow, because when it arrives in January 2000 the left arrow disappears.

Steps to reproduce

  1. Put a st.date_input in your app
  2. Try using arrows/or scroll in the dropdown menu before date: January 2000

You can actually set a date before January 2000 if you initialize it using value parameter, e.g.
d = st.date_input('When's your birthday', datetime.date(1980, 7, 6))
But even in this case, you don't see the left arrow anymore only the right one, also the dropdown still only shows Januar 2000.

Expected behavior:

Use the arrows or scroll through the dropdown box to go at any date in the past (or at least till 1900).

Actual behavior:

As soon as you reach at January, 2000 the left arrow disappears and also the scroll ends.

Is this a regression?

I don't know, because I haven't used it in the past.

Debug info

  • Streamlit version: 0.50.2
  • Python version: 3.7.3
  • Using venv
  • OS version: ManjaroLinux 18.1.2
  • Browser version: Mozilla Firefox 70.0 (64-bit)/Google Chrome 72.0.3626.121 (Official Build) (64-bit)

Additional information

Screenshot_2019-11-24 tax_calculator · Streamlit(1)
Screenshot_2019-11-24 tax_calculator · Streamlit
Screenshot_2019-11-25 tax_calculator · Streamlit

Original discussion: https://discuss.streamlit.io/t/date-input-cannot-set-before-january-2000/1126

Metadata

Metadata

Assignees

Labels

area:widgetsRelated to widget elementstype:bugSomething isn't working as expected

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions