Skip to content

Commit 657a094

Browse files
committed
Restore values from bookmark without defaulting to date.today()
1 parent b927363 commit 657a094

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

shiny/ui/_input_date.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from .._docstring import add_example
1010
from .._namespaces import resolve_id
11+
from ..bookmark import restore_input
1112
from ._html_deps_external import datepicker_deps
1213
from ._utils import shiny_input_label
1314

@@ -115,7 +116,7 @@ def input_date(
115116
shiny_input_label(resolved_id, label),
116117
_date_input_tag(
117118
id=resolved_id,
118-
value=value,
119+
value=restore_input(resolved_id, value),
119120
min=min,
120121
max=max,
121122
format=format,
@@ -230,6 +231,8 @@ def input_date_range(
230231
"""
231232

232233
resolved_id = resolve_id(id)
234+
start, end = tuple(restore_input(resolved_id, [start, end]))
235+
233236
return div(
234237
shiny_input_label(resolved_id, label),
235238
div(

0 commit comments

Comments
 (0)