okld / streamlit-elements

Create a draggable and resizable dashboard in Streamlit, featuring Material UI widgets, Monaco editor (Visual Studio Code), Nivo charts, and more!
MIT License
721 stars 83 forks source link

Date and Time Pickers are within mui-x not mui lab #17

Open mikful opened 2 years ago

mikful commented 2 years ago

Hi, thanks for the awesome package! I just wondered if it would work to redirect the paths for the Date and Time pickers as they don't exist in lab now?

https://mui.com/blog/lab-date-pickers-to-mui-x/

as per the following:?

https://github.com/mikful/streamlit-elements/blob/main/streamlit_elements/frontend/components/modules/mui/Lab.tsx

e.g. change in Lab.tsx

DatePicker: dynamic(() => import("@mui/lab/DatePicker"), { loading: ElementsLoading, ssr: false }),

to

DatePicker: dynamic(() => import("@mui/x-date-pickers/DatePicker"), { loading: ElementsLoading, ssr: false }),

If not, is there another way?

vcourintracks commented 1 year ago

I agree with Mikful, it would be awesome to be able to use pickers and add every components needed such as adapters like DateAdapterJs, etc... Your work on this combination between Streamlit and MUI is incredible, thanks for that !