Closed Salan54 closed 1 month ago
Hi @Salan54, please try
calendar_options = {
"editable": False, # instead of "false"
}
Sorry, I missed your comment. Thanks a lot.
I have :
calendar_options = { 'editable': 'False', 'navLinks': 'True', 'resources': [{...}], 'selectable': 'True', 'headerToolbar': {'left': 'today prev,next', 'center': 'title', 'right': 'dayGridDay,dayGridWeek,dayGridMonth'}, 'initialDate': '2024-05-01T00:00:00', 'initialView': 'dayGridMonth'}
But, I'm still able to move the slots with drag-and-drop.
I just need the user to be able to select a slot, that's it (hence 'selectable': 'True')
What is wrong with these settings? Thanks for your help.
@Salan54 try to remove the quotes in 'editable': 'False'
and change it to 'editable': False
instead
@im-perativa That's it... Thanks a lot, and thank you for your patience
I would like the user to not be able to modify the position of the slots via drag-and-drop.
I thought it was enough to set the "editable" variable in "options" to "false" to disable drag-and-drop... but it is not the case. It is still possible to move events by drag-and-drop. I also removed "eventChange" from the callbacks passed when calling calendar. It is still possible to manually move the slots...
What else should I do to make the streamlit-calendar respond only to user clicks without it being possible to interactively modify the events?
Thank you again for your help and this excellent component.