【发布时间】:2014-10-16 03:42:40
【问题描述】:
我想在 dateRangeInput 中显示最近 3 天的默认值。现在 Sys.Date() 设置开始、结束和最大值。这是我的 ui.R 和 server.R
ui.R
shinyUI(pageWithSidebar(
# Application title
headerPanel('dateRangeInput'),
# Sidebar with a slider input for number of observations
sidebarPanel(
wellPanel(
dateRangeInput('days', 'Select a date range:',
start = Sys.Date() - 3,
end = Sys.Date(),
max = Sys.Date()))
),
mainPanel()
))
服务器.R
shinyServer(function(input, output, session)
{
})
但是,当日期更改时,日期会冻结在 Shiny App 的启动日期。见截图。
如何根据当前日期动态更改开始、结束和最大值?感谢您的任何建议。
【问题讨论】: