To upload files, please first save the app
import datetime
import streamlit as st
# Function to find the next Monday
def next_monday(date):
days_ahead = 0 - date.weekday() + 0 # 0 is Monday
if days_ahead <= 0: # Target day already passed this week
days_ahead += 7
return date + datetime.timedelta(days_ahead)
# Get today's date and calculate next Monday
today = datetime.date.today()
monday = next_monday(today)
# Date input widget focused on Monday
d = st.date_input("Select a date (starting with next Monday)", monday)
st.write("You selected:", d)
Hi! I can help you with any questions about Streamlit and Python. What would you like to know?