0

I have a Shiny app date picker widget (dateInput), and I want the starting date to be blank- no date at all. Essentially I want the form to save nothing, or NA unless a user selects a date with the widget. I sort of got this to work by putting value = "" in the code, but I am having problems with a blank date writing to data on the server side, and I get warnings because "" is not in yyyy-mm-dd format. Can you help?

I did see this post: Setting date range picker start date to blank but this is a different widget than I am using.

...
dateInput("coap_injail_infodissemination_date", label = "Information Dissemination - Date Referred:", value = "", format = "mm/dd/yyyy",
            startview = "decade")
...

enter image description here

Brian
  • 7,900
  • 1
  • 27
  • 41
Jason
  • 23
  • 2
  • 2
    Could you use `value = as.Date(NA)` here? – Ben Feb 20 '20 at 02:36
  • I'll check it out! Thank you. On second review we may be moving to just a text entry field, instead of using this date widget. This way the field will be blank and we will provide instructions to enter in MM/DD/YYYY format – Jason Feb 21 '20 at 20:35

0 Answers0