Change date range input with action button

213 Views Asked by At

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?

1

There are 1 best solutions below

1
Caetano Almeida e Brito On BEST ANSWER

Possible answer:

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