[英]Run javascript datepicker in RStudio
I am trying to include a javascript datepicker in Shiny app. 我正在尝试在Shiny应用程序中包含一个javascript datepicker。 However, I don't know how to import and/or run the code in R. Here is the source: http://jqueryui.com/datepicker/
但是,我不知道如何在R中导入和/或运行代码。这是源: http : //jqueryui.com/datepicker/
I would ideally like to include this code in ui.R. 理想情况下,我希望将此代码包含在ui.R中。
Thanks in advance! 提前致谢!
Shiny comes with a date picker input: Shiny带有日期选择器输入:
ui <- fluidPage(
dateInput("date1", "Date:", value = "2012-02-29"),
# Default value is the date in client's time zone
dateInput("date2", "Date:"),
# value is always yyyy-mm-dd, even if the display format is different
dateInput("date3", "Date:", value = "2012-02-29", format = "mm/dd/yy"),
# Pass in a Date object
dateInput("date4", "Date:", value = Sys.Date()-10),
# Use different language and different first day of week
dateInput("date5", "Date:",
language = "ru",
weekstart = 1),
# Start with decade view instead of default month view
dateInput("date6", "Date:",
startview = "decade")
)
shinyApp(ui, server = function(input, output) { })
Demo: http://shiny.rstudio.com/gallery/date-selector.html 演示: http : //shiny.rstudio.com/gallery/date-selector.html
If that is not enough you can always build your own input object: https://shiny.rstudio.com/articles/building-inputs.html 如果这还不够,您可以随时构建自己的输入对象: https : //shiny.rstudio.com/articles/building-inputs.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.