File size: 597 Bytes
7e0e68d
ad507ba
f635ece
ad507ba
 
 
9246dec
ad507ba
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import streamlit as st
import datetime

# Function to get month names
def get_month_names():
    return [datetime.date(2000, i, 1).strftime('%B') for i in range(1, 13)]

# Define the range of years
years = range(2000, 2031)  # Modify this range as needed

# Selectbox for month
selected_month = st.selectbox("Select Month", get_month_names(), index=datetime.datetime.now().month - 1)

# Selectbox for year
selected_year = st.selectbox("Select Year", years, index=years.index(datetime.datetime.now().year))

# Display selected month and year
st.write("You selected:", selected_month, selected_year)