this is date picker for streamlit
Project description
Streamlit DatePicker
Project Introduction
streamlit-date-picker
is a date picker designed for use with Streamlit. It allows users to easily select a range of dates and times.
Installation
Install the package using the following command:
pip install streamlit-date-picker
Usage
import streamlit as st
from streamlit_date_picker import date_range_picker, date_picker, PickerType, Unit
st.title('Streamlit Date Picker')
# Use date_range_picker to create a datetime range picker
st.subheader('Date Range Picker')
datetime_string = date_range_picker(picker_type=PickerType.time.string_value,
start=-30, end=0, unit=Unit.minutes.string_value,
key='range_picker',
refresh_button={'is_show': True, 'button_name': 'Refresh last 30min',
'refresh_date': -30,
'unit': Unit.minutes.string_value})
if datetime_string is not None:
start_datetime = datetime_string[0]
end_datetime = datetime_string[1]
st.write(f"Date Range Picker [{start_datetime}, {end_datetime}]")
st.subheader('Date Picker')
# Use date_picker to create a date picker
date_string = date_picker(picker_type=PickerType.time.string_value, value=0, unit=Unit.days.string_value,
key='date_picker')
if date_string is not None:
st.write('Date Picker: ', date_string)
Parameter
Range Picker
picker_type
: Default Date, type: str, options: time, date, week, month, quarter, year.start
: Default start time, type: int, default value: -30.end
: Default end time, type: int, default value: 0.unit
: Default time unit, type: str, options: milliseconds, seconds, minutes, hours, days, weeks, months, years.key
: Picker key, default value: None.refresh_button
: Refresh button configuration, type: {'is_show': bool, 'button_name': str}, default values: False and 'Refresh last 30min'. When the button is clicked, it refreshes the selected time range.- The return value of datetime_range_picker is of type str.
Date Picker
picker_type
: Default Date, type: str, options: time, date, week, month, quarter, year.value
: Default value, type: int, default value: 0.unit
: Default time unit, type: str, options: milliseconds, seconds, minutes, hours, days, weeks, months, years.key
: Picker key, default value: None.
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
streamlit-date-picker-0.0.2b4.tar.gz
(892.1 kB
view hashes)
Built Distribution
Close
Hashes for streamlit-date-picker-0.0.2b4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ed281586eb24abea0dd60104d841f7e9ac20a02d96b93430eb14e2a6f28f6a5 |
|
MD5 | b12acad164947d02c11531c9060d18a7 |
|
BLAKE2b-256 | d097be17cb05c7459bc607e01404c378c85686a40d045f480303ce28600ee8ee |
Close
Hashes for streamlit_date_picker-0.0.2b4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5449b72973ccc1afe87cdc61145e98844258abe2bbdbe123c40a7e94defed63 |
|
MD5 | 69bad99829dcd36633b11f93cdc42f9b |
|
BLAKE2b-256 | bc1b5b84a8ac6b82820a2890e91c3b9dd1fe87a96faa1f40152815488b4a7d80 |