mirror of
https://github.com/rstudio/shiny.git
synced 2026-02-08 05:35:07 -05:00
Updates can clear date and date range inputs
This commit is contained in:
@@ -14,6 +14,12 @@ $.extend(dateInputBinding, {
|
||||
},
|
||||
// value must be an unambiguous string like '2001-01-01', or a Date object.
|
||||
setValue: function(el, value) {
|
||||
// R's NA, which is null here will remove current value
|
||||
if (value === null) {
|
||||
$(el).find('input').val('').datepicker('update');
|
||||
return;
|
||||
}
|
||||
|
||||
var date = this._newDate(value);
|
||||
// If date is invalid, do nothing
|
||||
if (isNaN(date))
|
||||
|
||||
Reference in New Issue
Block a user