Skip to content

Commit

Permalink
Styring på datoverdier etter rapporttype.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinthon committed Jun 21, 2023
1 parent b01e66e commit d7eec68
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 5 additions & 1 deletion R/moduleDefaultReport.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@ NULL
defaultReportInput <- function(
id,
startDate = lubridate::today() - lubridate::years(1),
endDate = lubridate::today() - lubridate::weeks(1)) {
endDate = lubridate::today() - lubridate::weeks(1),
min = "1980-01-01",
max = "2100-01-01") {

shiny::tagList(
shiny::dateRangeInput(shiny::NS(id, "dateRange"),
label = "Velg periode:",
start = startDate,
end = endDate,
min = min,
max = max,
separator = "-"),
shiny::radioButtons(shiny::NS(id, "format"),
"Format for nedlasting",
Expand Down
9 changes: 7 additions & 2 deletions inst/shinyApps/smerte/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ ui <- shiny::tagList(
"Dekningsgrad før reservasjon",
shiny::sidebarLayout(
shiny::sidebarPanel(
smerte::defaultReportInput("dekningsgrad")
smerte::defaultReportInput("dekningsgrad",
startDate = "2022-01-01",
endDate = "2022-11-30",
max = "2022-11-30")
),
shiny::mainPanel(
smerte::defaultReportUI("dekningsgrad")
Expand All @@ -50,7 +53,9 @@ ui <- shiny::tagList(
"Dekningsgrad etter reservasjon",
shiny::sidebarLayout(
shiny::sidebarPanel(
smerte::defaultReportInput("dekningsgradReserv")
smerte::defaultReportInput("dekningsgradReserv",
startDate = "2022-12-01",
min = "2022-12-01")
),
shiny::mainPanel(
smerte::defaultReportUI("dekningsgradReserv")
Expand Down

0 comments on commit d7eec68

Please sign in to comment.