I'm hoping I don't need to provide a repro demo here if this question can be answered right away. I'd like to remove all div elements under the parent div with id="daterangescontrol" everytime I upload a file to my Shiny app. So my code is like this:
removeUI(selector = "div#daterangescontrol div")
FYI under div#daterangescontrol, there are div#daterange1, div#daterange2...div#daterange(n) generated dynamically depending on the number of columns in the dataset, which can be converted to Date. My objective is to remove all these div children when a new file is uploaded (new dataset). However. the above line of code can only remove the first child, e.g. div#daterange1. I wonder whether it's because I didn't use the right syntax for the selector. I'm not quite familiar with css. Would anyone please help? Thanks!
EDIT:
The demo code is provided in my other question post:
How to validate date range input in Shiny
please check removeUI in observeEvent(input$file).