更改dateRangeInput()日记框在闪亮应用程序中的位置

时间:2020-03-10 19:18:50

标签: r shiny date-range

是否有办法在单击dateRangeInput()之后显示可用日期比默认位置低一点的框?我的原始应用程序中有一个问题,我不知道为什么会发生,因此无法重新创建它。

enter image description here

library(shiny)
library(shinydashboard)
library(shinydashboardPlus)

shinyApp(
  ui = tags$body(class="skin-blue sidebar-mini control-sidebar-open", dashboardPagePlus(
    tags$head(
      tags$style(
        HTML(
          ".control-sidebar-tabs {display:none;}"
        )
      )
    ),
    header = dashboardHeaderPlus(
      enable_rightsidebar = TRUE,
      rightSidebarIcon = "gears"
    ),
    sidebar = dashboardSidebar(),
    body = dashboardBody(
    ),
    rightsidebar = rightSidebar(
      background = "dark",
      uiOutput("sel"),
      uiOutput("dr")
    ),
    title = "Right Sidebar"
  )),
  server = function(input, output) {
    output$dr <- renderUI({
      dateRangeInput("range_date", "Enter Date Range", start = "2001-01-01",
                     end   = "2010-12-31" , format = "yyyy-mm")
    })
    output$sel<-renderUI({
      selectInput("variable", "Variable:",
                  c("Cylinders" = "cyl",
                    "Transmission" = "am",
                    "Gears" = "gear"))
    })

  }
)

0 个答案:

没有答案