title: Unable to Disable a shiny app radio button using Shinyjs()
body: <p>I'm trying to disable a shiny app radio button ("Trend") when <code>input$Product !=A &amp;&amp; input$month !="All"</code> using the Shinyjs package, but have been unsuccessful.</p>
  
  <p>My ui page is defined as:</p>
  
  <pre><code>ui &lt;- fluidPage(
     shinyjs::useShinyjs(),
     pageWithSidebar(
     titlePanel("Analytics"),
  
      sidebarPanel(
        selectInput("product",
                label = "Choose a Product",
                choices = list("A", "B", "C", "All")),
  
        selectInput("month",
                label = "Choose TimeFrame",
                choices = list("June", "July", "August", "September", "All")),
  
        radioButtons('ptype', label ="Plot Type",
                  c(Histogram = 'histogram',
                    Box = 'boxp',
                    Trend = 'trendp')
                 )
  
  ),
  </code></pre>
  
  <p>My server side code:</p>
  
  <pre><code> shinyServer(function (input, output, session) {
  
    mydata&lt;- read.csv("mydataQ1fy16.csv")
  
    observe({shinyjs::toggleState("trendp", input$product != "A" &amp;&amp; input$month != "All") })    
  
      getMonthproduct &lt;- reactive( {
        if(input$month != "All" &amp;input$product !="All") {
           plotdata &lt;- mydata %&gt;% filter(Product ==input$product, Monthly ==input$month)} 
  
         else if (input$month =="All" &amp; input$product =="All") {
           plotdata &lt;- mydata
            }
           else if(input$product == "All") {
             plotdata &lt;- mydata %&gt;% filter(Monthly == input$month)
  
           }
            else if(input$month == "All") {
              plotdata &lt;- mydata %&gt;% filter(Product == input$product)
  
             }
       return(plotdata)
       })
  </code></pre>