Skip to content

dateInput() using outdated bootstrap-datepicker.min.js #4273

@dleopold

Description

@dleopold

System details

> sessionInfo()
R version 4.4.2 (2024-10-31)
Platform: x86_64-pc-linux-gnu
Running under: Pop!_OS 22.04 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;  LAPACK version 3.10.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: America/Boise
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] shiny_1.11.1

loaded via a namespace (and not attached):
 [1] digest_0.6.37     later_1.4.2       R6_2.6.1          httpuv_1.6.16     fastmap_1.2.0     magrittr_2.0.3    cachem_1.1.0     
 [8] memoise_2.0.1     htmltools_0.5.8.1 lifecycle_1.0.4   promises_1.3.3    cli_3.6.5         xtable_1.8-4      sass_0.4.10      
[15] textshaping_0.4.1 jquerylib_0.1.4   withr_3.0.2       rsconnect_1.3.3   systemfonts_1.2.1 compiler_4.4.2    rstudioapi_0.17.1
[22] tools_4.4.2       ragg_1.3.3        bslib_0.9.0       mime_0.13         Rcpp_1.0.14       jsonlite_2.0.0    rlang_1.1.6      

Repex:

library(shiny)

# Define UI for application that draws a histogram
ui <- fluidPage(

    # Application title
    titlePanel("Old Faithful Geyser Data"),

    # Sidebar with a slider input for number of bins 
    sidebarLayout(
      
        sidebarPanel(
          dateInput(
            inputId = "date",
            label = "Select a date:"
          ),
            sliderInput("bins",
                        "Number of bins:",
                        min = 1,
                        max = 50,
                        value = 30)
        ),

        # Show a plot of the generated distribution
        mainPanel(
           plotOutput("distPlot")
        )
    )
)

# Define server logic required to draw a histogram
server <- function(input, output) {

    output$distPlot <- renderPlot({
        # generate bins based on input$bins from ui.R
        x    <- faithful[, 2]
        bins <- seq(min(x), max(x), length.out = input$bins + 1)

        # draw the histogram with the specified number of bins
        hist(x, breaks = bins, col = 'darkgray', border = 'white',
             xlab = 'Waiting time to next eruption (in mins)',
             main = 'Histogram of waiting times')
    })
}

Describe the problem in detail

Simply adding a dateInput to shiny app results in many "DEPRECIATED" warning in the console:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions