code: def test_range_is_empty_if_calendar_closed_empty(app: Page):
      """Test that range value is empty of calendar closed empty."""
      app.get_by_test_id("stDateInput").nth(4).click()
  
      # Select start date: '2019/07/10'
      app.locator(
          '[data-baseweb="calendar"] [aria-label^="Choose Wednesday, July 10th 2019."]'
      ).first.click()
  
      expect(app.get_by_test_id("stMarkdown").nth(4)).to_have_text(
          "Value 5: (datetime.date(2019, 7, 10),)",
          use_inner_text=True,
      )
  
      # Select end date: '2019/07/12'
      app.locator(
          '[data-baseweb="calendar"] [aria-label^="Choose Friday, July 12th 2019."]'
      ).first.click()
  
      expect(app.get_by_test_id("stMarkdown").nth(4)).to_have_text(
          "Value 5: (datetime.date(2019, 7, 10), datetime.date(2019, 7, 12))",
          use_inner_text=True,
      )
  
      # Close calendar without selecting a date
      date_input_field = app.locator(".stDateInput input").nth(4)
      date_input_field.focus()
      date_input_field.clear()
  
      # Click outside of the calendar to submit value
      app.get_by_test_id("stMarkdown").nth(4).click()
  
      # Range should be empty
      expect(app.get_by_test_id("stMarkdown").nth(4)).to_have_text(
          "Value 5: ()",
          use_inner_text=True,
      )
  
file_path: streamlit/e2e_playwright/st_date_input_test.py
imports: from playwright.sync_api import Page, expect
  from e2e_playwright.conftest import ImageCompareFunction
label_desc: Use image node_id 12 for calling a global function with example usage: test_range_is_empty_if_calendar_closed_empty(app) without return types