Search code examples
rshinydate-rangeaction-button

Change date range input with action button


I´m using a date range input for setting the time limits of my data tables.

Nevertheless, I want to have buttons (I thought on action buttons) to quickly set up a time range (e.g, 1 month). Hence, not having to select manually in the date range input the time span desired. Is it possible?


Solution

  • Possible answer:

      observeEvent(input$action_3, {
           updateDateRangeInput(inputId = "DateRange",
                                 start = today() %m-% months(6),
                                 end = today()