Drop files here
or click to upload
import streamlit as st
import streamlit.components.v1 as components
# HTML and JavaScript for Flatpickr date picker with Monday as the first day
flatpickr_html = """
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
<script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
<div>
<input type="text" id="date-picker" placeholder="Select a date">
</div>
<script>
document.addEventListener("DOMContentLoaded", function() {
flatpickr("#date-picker", {
"locale": {
"firstDayOfWeek": 1 // Monday as the first day
},
dateFormat: "Y-m-d"
});
});
</script>
"""
# Display the Flatpickr date picker in Streamlit
components.html(flatpickr_html, height=400)
Hi! I can help you with any questions about Streamlit and Python. What would you like to know?