I want to change the colour of the text in an input field conditionally.
I create my input field as follows:
date = st.text_input(label="Published Date:", key="dateInput", value=st.session_state["current_date"])
My condition is like this:
if response['date_adjusted'] == 1:
st.session_state.dateInput = f":orange[{response['date']}]"
else:
st.session_state.dateInput = f":#FAFAFA[{response['date']}]"
However this does not colourise the text in the input field and just displays it as “:orange[{response[‘date’]}]”
How do I achieve what I want?
Best Regards,
Configentia