I am making animation using `animationOptions` in `sliderInput()`. I want to use date/daterange in a slider, but `sliderInput()` does not accept date. There was a [post](https://groups.google.com/forum/#!topic/shiny-discuss/uKD3tv-WFik) in the shiny group. As of March, 2013, there was no solution yet. So I searched around and learned that one can achieve this using JavaScript. Here is the [post](https://stackoverflow.com/questions/17677882/r-shiny-sliderinput-show-time). Unfortunately, I cannot write in JS. So, I searched around more and came up with [this link](https://github.com/rstudio/shiny/issues/66) and wrote the following codes. This works, but the numbers on the slider are confusing. Is this the only way one can move around and use date in `sliderInput()`? Thank you very much for taking your time.

**server.R**

```
library(shiny)

shinyServer(function(input, output, session) {

observe({
    updateDateInput(session, "ana", value = as.Date("2014-07-01") + input$foo)
})

output$preImage <- renderImage({

filename <- normalizePath(file.path('./www',
                          paste(input$ana, '.png', sep='')))

list(src = filename,
     alt = paste("There is no image for ", input$ana, ".", sep = ""))

}, deleteFile = FALSE)

})

```

**ui.R**

```
shinyUI(pageWithSidebar(

    headerPanel("renderImage example"),

sidebarPanel(

    sliderInput("foo", "Animation duration", min = -30,
                max = 30, value = 0, step = 1,
                animate = animationOptions(loop = TRUE, interval = 1000)),

    dateInput("ana", "Choose a date:", value = as.Date("2014-07-01"))

    ),

mainPanel(

# Use imageOutput to place the image on the page
imageOutput("preImage")

    )
))

```