Is there a way to Hack or Create a dateRangeInput()
selector in Shiny so that it selects only month-year (no day) or that it automatically selects the first day
I've just used airDatePicker()
to do this. You can edit the minimum view of the popup calendar to "month" and select the date format as "yyyy-mm".
airDatepickerInput("input_var_name",
label = "Start month",
value = "2015-10-01",
maxDate = "2016-08-01",
minDate = "2015-08-01",
view = "months", #editing what the popup calendar shows when it opens
minView = "months", #making it not possible to go down to a "days" view and pick the wrong date
dateFormat = "yyyy-mm"
)
The version I've just been working on looks like this (greyed may is where cursor was hovering when I took the screenshot):