R shiny datatable filter box size to narrow to see text

A similar question was answered here.

Also, in order to use range sliders to filter rows within ranges, consider converting the "Date List" column to the date format using as.Date().


I solved this problem using CSS:

input {
    width: 100px !important;
}

You can also apply this style to factor filters only:

td[data-type="factor"] input {
    width: 100px !important;
}

Put my.css file in www subdirectory, and link to it:

shinyApp(
    ui = fluidPage(
        tags$head(
            tags$link(
                rel = "stylesheet",
                type = "text/css",
                href = "my.css")
        ),

        DT::dataTableOutput(...)
    )