0

My issue is similar to this 2018 problem, and there is a working example in the link.

When you use a numericInput widget in Shiny, you can set a value and a step by which the user can change the value. I'd like to set a standard value with decimals, such as 53.66, but have the step remain 1 so the user can easily change the values just by clicking a few times.

However, when the user hovers the cursor over the widget, they get a message that says that the only valid values are numbers ending with .66. The widget works just fine with wathever values, but the message can mislead users.

Is there anyway to supress the message? Or change it?

Thanks!

1
  • 1
    Even if the question is repeated you should make sure that your question has all the code and data to be a standalone question. 1) This makes it easier to help you faster so that we don't have to click on another link, read through everything to find what your question actually is and more importantly 2) If that question is deleted for some reason your post has no meaning for future visitors. Commented Sep 12, 2021 at 9:27

1 Answer 1

1

Sure, you can set step = "any".

Source

shinyApp(
  ui = fluidPage(
    numericInput("test", "test", 1, step = "any"),
    verbatimTextOutput("testvalue")
  ),
  server = function(input, output, session) {
    updateNumericInput(session, "test", value = 1.1)
    output$testvalue <- renderText({paste0("test value ", input$test)})
  }
)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.