rstudio/shiny — pull request #152 by wch (2013-04-22 21:41:31+00:00)
Title: Add dateInput and dateRangeInput

This adds dateInput and dateRangeInput, and the corresponding input setter (updater) functions.

Example app at:
http://glimmer.rstudio.com/winstontest/dateinput/
https://github.com/wch/testapp/tree/master/dateinput

Currently there are a few outstanding issues:

* The R/C `strptime` date format specification has no way of specifying numeric month _without_ the leading zero -- though it does let you specify the day of the month without leading zero. This means that it's not possible to tell the client to display month without leading zero. If we want to add this capability, we'd have to add a custom format string.
* There seems to be an off-by-one error when setting the min (but not the max) of a date input or date range input. This may have something to do with timezone issues.
* The labels for date input don't wrap, but the labels for date range input do wrap. (See the example app for a demonstration.)
* The date format specification on the R side conforms to the R/C `strptime` format, for example, `%Y-%m-%d`. These format strings get translated to something like `yyyy-mm-dd` before it's sent to the client, because that's what the Javascript library expects. However, when requesting the date format via `getState()` from the client, the client gives `yyyy-mm-dd`, and not the original `strptime` format. So it would be necessary to translate it back on the R side.
* For date range input, when one of the boxes is first clicked, it doesn't highlight the other value. For example, in the example app, if you click on the lower value box for first date range input, it doesn't highlight the upper value.