Skip to content

Commit 42f33cd

Browse files
committed
Adding blank value test
1 parent a899b94 commit 42f33cd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/playwright/shiny/components/datepicker/app.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,8 @@ def empty_format():
8484
def _():
8585
d = date.fromisoformat("2011-11-05")
8686
ui.update_date("start_date_picker", value=d)
87+
ui.update_date("min_date_picker", value="")
8788
ui.update_date("str_date_picker", value="2020-01-01")
8889

89-
# Note: You cannot update the value of a date input to None (it will be dropped).
90-
# Note: You cannot update the value of a date input to an empty string. This is a Bootstrap Datepicker limitation.
91-
9290

9391
app = App(app_ui, server, debug=True)

tests/playwright/shiny/components/datepicker/test_datepicker.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,8 @@ def test_dynamic_navs(page: Page, local_app: ShinyAppProc) -> None:
5555
date1.expect_value("05.11.2011")
5656
date_output.expect_value("Date Picker Value: 2011-11-05")
5757

58+
date2.expect_value("")
59+
date_output2.expect_value("Date Picker Value: None")
60+
5861
date3.expect_value("01-01-2020")
5962
date_output3.expect_value("Date Picker Value: 2020-01-01")

0 commit comments

Comments
 (0)