How to set dateInput value using Actionbutton

114 views Asked by At

I'm using Shiny and Shinydashboard in an R environment.

I have a shiny app that displays my company's payments for a date range determined by two dateInput fields that the user can set. It then displays our total payments, and the fees collected from those payments for that date range.

This information is then rendered into a pivotTable reactively.

My goal is to make a "Show MTD" actionButton that will set the START date to the 1st of the current month, and the END date to the current day.

I am still fairly new with Shiny and R, and I'm having some trouble figuring out how to do this. I thought of using an observeEvent on the actionButton would do it, but I'm not sure how to set the value of the dateInput fields using the button.

As always, any help or direction is appreciated!

0

There are 0 answers