Description Usage Arguments Details Value Author(s) See Also Examples
Create tabular text inputs that, when clicked on, bring up a calendar that the user can click on to select dates.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | dateInput_cell(
inputId,
label = "",
value = NULL,
min = NULL,
max = NULL,
format = "yyyy-mm-dd",
startview = "month",
weekstart = 0,
language = "en",
width = "",
emptyValueNoDefault = TRUE,
disabled = FALSE,
hidden = FALSE
)
dateInput_row(
inputId,
label = "",
value = NULL,
min = NULL,
max = NULL,
format = "yyyy-mm-dd",
startview = "month",
weekstart = 0,
language = "en",
width = "",
leftLabel = TRUE,
disabled = FALSE,
hidden = FALSE
)
|
inputId |
the input slot that will be used to acces the value |
label |
Display label for the control, or |
value |
The starting date. Either a date object, or a string in
|
min |
the minimum allowed date. Either a date object, or a string in
|
max |
the maximum allowed date. Either a date object, or a string in
|
format |
The format for the date to display in the browser. Defaults
to |
startview |
The date range shown when the input object is first
clicked. Can be |
weekstart |
Which day is the start of the week. Should be an integer from 0 (Sunday) to 6 (Saturday) |
width |
The width of the input, eg |
The |
language used for month and day names. Default is |
For more about format
strings, see the documentation for
dateInput
dateInput_cell
returns a character vector the length of inputId
.
dateInput_row
returns a data frame with two columns and a row for every
element in inputId
Benjamin Nutter
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## Not run:
options(pixiedust_print_method = "html")
shinyApp(
ui = shinyUI(
navbarPage(title = "Example",
tabsetPanel(
tabPanel(title = "Dates",
uiOutput("sampleUI")
)
)
)
),
server = shinyServer(function(input, output){
output$sampleUI <-
renderText({
dateInput_row(inputId = paste0("car", 1:nrow(mtcars)),
label = rownames(mtcars)) %>%
dust() %>%
print(asis = FALSE)
})
})
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.